From e0bf9ba4039fb2bba979674ba5374657f5001760 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivar=20Conradi=20=C3=98sthus?= Date: Fri, 24 Sep 2021 14:11:36 +0200 Subject: [PATCH] fix: envrionments should have type --- .../20210920104218-rename-global-env-to-default-env.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/migrations/20210920104218-rename-global-env-to-default-env.js b/src/migrations/20210920104218-rename-global-env-to-default-env.js index a6b8839d5e..2efbe72058 100644 --- a/src/migrations/20210920104218-rename-global-env-to-default-env.js +++ b/src/migrations/20210920104218-rename-global-env-to-default-env.js @@ -3,7 +3,7 @@ const up = function (db, cb) { db.runSql( ` - INSERT INTO environments(name, display_name, protected, sort_order) VALUES ('default', 'Default Environment', true, 1); + INSERT INTO environments(name, display_name, protected, sort_order, type) VALUES ('default', 'Default Environment', true, 1, 'production'); ALTER TABLE feature_strategies ALTER COLUMN environment SET DEFAULT 'default'; ALTER TABLE feature_environments ALTER COLUMN environment SET DEFAULT 'default'; UPDATE feature_strategies SET environment = 'default' WHERE environment = ':global:'; @@ -18,7 +18,7 @@ const up = function (db, cb) { const down = function (db, cb) { db.runSql( ` - INSERT INTO environments(name, display_name, protected) VALUES (':global:', 'Across all environments', true); + INSERT INTO environments(name, display_name, protected, type) VALUES (':global:', 'Across all environments', true, 'production'); ALTER TABLE feature_strategies ALTER COLUMN environment SET DEFAULT ':global:'; ALTER TABLE feature_environments ALTER COLUMN environment SET DEFAULT ':global:'; UPDATE feature_strategies SET environment = ':global:' WHERE environment = 'default';