From 42bf04c46a0ab7b0252f3479e2168f299ff6ee32 Mon Sep 17 00:00:00 2001 From: Colton Hurst Date: Sun, 6 Aug 2023 16:21:06 -0400 Subject: [PATCH] SM-873: Move the SecretsManagerBeta Data Migration Into a Normal Migration (#3159) * SM-873: Remove SecretsManagerBetaColumn data migration and add new migration * SM-873: Remove EF latest migration --- ...023-08-04_00_SecretsManagerBetaColumnData.sql | 15 +++++++++++++++ ..._00_SecretsManagerBetaColumnDataMigration.sql | 16 ---------------- 2 files changed, 15 insertions(+), 16 deletions(-) create mode 100644 util/Migrator/DbScripts/2023-08-04_00_SecretsManagerBetaColumnData.sql delete mode 100644 util/Migrator/DbScripts_data_migration/2023-07-26_00_SecretsManagerBetaColumnDataMigration.sql diff --git a/util/Migrator/DbScripts/2023-08-04_00_SecretsManagerBetaColumnData.sql b/util/Migrator/DbScripts/2023-08-04_00_SecretsManagerBetaColumnData.sql new file mode 100644 index 0000000000..f2d45e5b52 --- /dev/null +++ b/util/Migrator/DbScripts/2023-08-04_00_SecretsManagerBetaColumnData.sql @@ -0,0 +1,15 @@ +/* + Set SecretsManagerBeta to 1 for Organizations where UseSecretsManager is 1. + At this time (at GA release) these are the Organizations using SecretsManager in beta. + We want to mark they are using SecretsManager beta for the sunset period, before + eventually removing the SecretsManagerBeta column and turning off beta access. + + Please note- this was a data migration script until SM-873. +*/ +IF COL_LENGTH('[dbo].[Organization]', 'SecretsManagerBeta') IS NOT NULL +BEGIN + UPDATE [dbo].[Organization] + SET [SecretsManagerBeta] = 1 + WHERE [UseSecretsManager] = 1 +END +GO diff --git a/util/Migrator/DbScripts_data_migration/2023-07-26_00_SecretsManagerBetaColumnDataMigration.sql b/util/Migrator/DbScripts_data_migration/2023-07-26_00_SecretsManagerBetaColumnDataMigration.sql deleted file mode 100644 index 49df5451c3..0000000000 --- a/util/Migrator/DbScripts_data_migration/2023-07-26_00_SecretsManagerBetaColumnDataMigration.sql +++ /dev/null @@ -1,16 +0,0 @@ -/* -This is the data migration script for adding the SecretsManagerBeta column. -The initial migration util/Migrator/DbScripts/2023-07-03_00_SecretsManagerBetaColumn.sql should be run prior. -There is no final migration. -*/ -IF COL_LENGTH('[dbo].[Organization]', 'SecretsManagerBeta') IS NOT NULL -BEGIN - -- Set SecretsManagerBeta to 1 for Organizations where UseSecretsManager is 1. - -- At this time (at GA release) these are the Organizations using SecretsManager in beta. - -- We want to mark they are using SecretsManager beta for the sunset period, before - -- eventually removing the SecretsManagerBeta column and turning off beta access. - UPDATE [dbo].[Organization] - SET [SecretsManagerBeta] = 1 - WHERE [UseSecretsManager] = 1 -END -GO