1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-19 00:15:43 +01:00

fix: feature_strategies paramter column should not be null (#1024)

This commit is contained in:
Ivar Conradi Østhus 2021-10-13 12:42:57 +02:00
parent 26a2f9d27f
commit 426666f6bc
No known key found for this signature in database
GPG Key ID: 31AC596886B0BD09

View File

@ -0,0 +1,16 @@
'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();
};