diff --git a/src/migrations/20220511111823-patch-broken-feature-strategies.js b/src/migrations/20220511111823-patch-broken-feature-strategies.js new file mode 100644 index 0000000000..5f771a892a --- /dev/null +++ b/src/migrations/20220511111823-patch-broken-feature-strategies.js @@ -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(); +};