clean up migrations
This commit is contained in:
parent
393f45a1b3
commit
94ee178c65
4 changed files with 40 additions and 38 deletions
|
|
@ -59,16 +59,11 @@ exports.up = function (next) {
|
|||
'created timestamp NOT NULL DEFAULT now() ' +
|
||||
')',
|
||||
'CREATE INDEX ON dispenses (device_fingerprint)'
|
||||
];
|
||||
]
|
||||
|
||||
// Need to call this separately to ignore error
|
||||
// in case transactions doesn't exist
|
||||
var renameSql = 'ALTER TABLE transactions RENAME TO transactions_old';
|
||||
db.silentQuery(renameSql, function() {
|
||||
db.multi(sqls, next);
|
||||
});
|
||||
};
|
||||
db.multi(sqls, next)
|
||||
}
|
||||
|
||||
exports.down = function(next) {
|
||||
next();
|
||||
};
|
||||
exports.down = function (next) {
|
||||
next()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue