1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-18 20:09:08 +02:00
unleash.unleash/src/migrations/20220511124923-fix-patch-broken-feature-strategies.js
2022-05-11 14:52:38 +02:00

20 lines
457 B
JavaScript

'use strict';
exports.up = function (db, cb) {
db.runSql(
`
UPDATE feature_strategies
SET project_name = project
FROM features
WHERE features.project != feature_strategies.project_name
AND features.name = feature_strategies.feature_name;
`,
cb,
);
};
// This is a fix for a broken state, we don't want this to be rolled back
exports.down = function (db, cb) {
cb();
};