From bbb55ef8dea092d6a6246297c507bd58bc959bbc Mon Sep 17 00:00:00 2001 From: Justin Baur <136baur@gmail.com> Date: Thu, 12 May 2022 10:11:47 -0400 Subject: [PATCH] Limit migrations to only once (#1996) --- util/Migrator/DbScripts/2022-03-01_00_AddApiKeysTable.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/util/Migrator/DbScripts/2022-03-01_00_AddApiKeysTable.sql b/util/Migrator/DbScripts/2022-03-01_00_AddApiKeysTable.sql index b1cd1205f..5afb2e727 100644 --- a/util/Migrator/DbScripts/2022-03-01_00_AddApiKeysTable.sql +++ b/util/Migrator/DbScripts/2022-03-01_00_AddApiKeysTable.sql @@ -201,6 +201,7 @@ BEGIN 0 AS [Type], -- 0 represents 'Default' type [RevisionDate] FROM [dbo].[Organization] + WHERE NOT EXISTS(SELECT [Id] FROM [dbo].[OrganizationApiKey] [ApiKey] WHERE [ApiKey].[OrganizationId] = [OrganizationId] AND [ApiKey].[Type] = 0) PRINT N'Dropping old column' ALTER TABLE