2017-02-11 11:17:11 +01:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
const async = require('async');
|
|
|
|
|
2017-06-28 14:10:32 +02:00
|
|
|
exports.up = function(db, cb) {
|
|
|
|
async.series(
|
|
|
|
[
|
|
|
|
db.addColumn.bind(db, 'strategies', 'built_in', {
|
|
|
|
type: 'int',
|
|
|
|
defaultValue: 0,
|
|
|
|
}),
|
|
|
|
db.runSql.bind(
|
|
|
|
db,
|
2020-04-14 22:29:11 +02:00
|
|
|
"UPDATE strategies SET built_in=1 where name='default'",
|
2017-06-28 14:10:32 +02:00
|
|
|
),
|
|
|
|
],
|
2020-04-14 22:29:11 +02:00
|
|
|
cb,
|
2017-06-28 14:10:32 +02:00
|
|
|
);
|
2017-02-11 11:17:11 +01:00
|
|
|
};
|
|
|
|
|
2017-06-28 14:10:32 +02:00
|
|
|
exports.down = function(db, cb) {
|
2017-02-11 11:17:11 +01:00
|
|
|
return db.removeColumn('strategies', 'built_in', cb);
|
|
|
|
};
|