1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-23 00:22:19 +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 committed by GitHub
parent 01509b0e09
commit daba53976d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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();
};