clean up migrations

This commit is contained in:
Josh Harvey 2017-05-07 18:34:46 +03:00
parent 236070668a
commit 279c296aee
8 changed files with 25 additions and 103 deletions

View file

@ -3,7 +3,7 @@
var db = require('./db')
exports.up = function (next) {
db.query('CREATE TABLE IF NOT EXISTS cached_responses ( ' +
db.multi(['CREATE TABLE IF NOT EXISTS cached_responses ( ' +
'id serial PRIMARY KEY, ' +
'device_fingerprint text NOT NULL, ' +
'session_id uuid NOT NULL, ' +
@ -12,7 +12,7 @@ exports.up = function (next) {
'body json NOT NULL, ' +
'created timestamptz NOT NULL DEFAULT now(), ' +
'UNIQUE (device_fingerprint, session_id, path, method) ' +
')', next)
')'], next)
}
exports.down = function (next) {