From b8b2efa7672f29005c9158582c3d81c438748d63 Mon Sep 17 00:00:00 2001 From: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com> Date: Thu, 7 Sep 2023 11:33:46 -0500 Subject: [PATCH] Remove indexing from data migration (#3247) --- .../2023-08-10_00_ClientSecretHashDataMigration.sql | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/util/Migrator/DbScripts/2023-08-10_00_ClientSecretHashDataMigration.sql b/util/Migrator/DbScripts/2023-08-10_00_ClientSecretHashDataMigration.sql index 66869d48b7..0462d64622 100644 --- a/util/Migrator/DbScripts/2023-08-10_00_ClientSecretHashDataMigration.sql +++ b/util/Migrator/DbScripts/2023-08-10_00_ClientSecretHashDataMigration.sql @@ -6,14 +6,6 @@ The final migration is in util/Migrator/DbScripts/2023-08-10_01_RemoveClientSecr IF COL_LENGTH('[dbo].[ApiKey]', 'ClientSecretHash') IS NOT NULL AND COL_LENGTH('[dbo].[ApiKey]', 'ClientSecret') IS NOT NULL BEGIN - -- Add index - IF NOT EXISTS(SELECT name FROM sys.indexes WHERE name = 'IX_ApiKey_ClientSecretHash') - BEGIN - CREATE NONCLUSTERED INDEX [IX_ApiKey_ClientSecretHash] - ON [dbo].[ApiKey]([ClientSecretHash] ASC) - WITH (ONLINE = ON) - END - -- Data Migration DECLARE @BatchSize INT = 10000 WHILE @BatchSize > 0 @@ -34,9 +26,5 @@ BEGIN COMMIT TRANSACTION Migrate_ClientSecretHash END - -- Drop index - DROP INDEX IF EXISTS [IX_ApiKey_ClientSecretHash] - ON [dbo].[ApiKey]; - END GO