1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-11 00:08:30 +01:00

fix: Repair feature strategies with broken project ids (#1593)

This commit is contained in:
sighphyre 2022-05-11 13:41:35 +02:00 committed by GitHub
parent 119d958e7c
commit 37fa254ceb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,18 @@
'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;
`,
cb,
);
};
// This is a fix for a broken state, we don't want this to be rolled back
exports.down = function (db, cb) {
cb();
};