1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-28 00:06:53 +01:00
unleash.unleash/src/migrations/20211013093114-feature-strategies-parameters-not-null.js

17 lines
403 B
JavaScript

'use strict';
exports.up = function (db, cb) {
db.runSql(
`
ALTER TABLE feature_strategies ALTER COLUMN parameters SET DEFAULT '{}';
UPDATE feature_strategies set parameters = '{}' where parameters is null;
ALTER TABLE feature_strategies ALTER COLUMN parameters SET NOT NULL;
`,
cb,
);
};
exports.down = function (db, cb) {
cb();
};