diff --git a/src/migrations/20220603081324-add-archive-at-to-feature-toggle.js b/src/migrations/20220603081324-add-archive-at-to-feature-toggle.js index 6c356d52cd..c0324ec5ff 100644 --- a/src/migrations/20220603081324-add-archive-at-to-feature-toggle.js +++ b/src/migrations/20220603081324-add-archive-at-to-feature-toggle.js @@ -14,7 +14,8 @@ exports.up = function (db, callback) { (SELECT Max(created_at) date FROM events WHERE type = 'feature-archived' - AND e.feature_name = f.NAME)) res + AND feature_name = f.NAME + AND f.archived = 't')) res WHERE res.NAME = f.NAME; UPDATE features SET archived_at = Now()