diff --git a/util/Migrator/DbScripts/2024-09-05_00_SyncDuoVersionFourMetaDataToVersionTwo.sql b/util/Migrator/DbScripts/2024-09-05_00_SyncDuoVersionFourMetaDataToVersionTwo.sql index 18505cdc0c03..9f49c76b2b3e 100644 --- a/util/Migrator/DbScripts/2024-09-05_00_SyncDuoVersionFourMetaDataToVersionTwo.sql +++ b/util/Migrator/DbScripts/2024-09-05_00_SyncDuoVersionFourMetaDataToVersionTwo.sql @@ -34,9 +34,6 @@ BEGIN AND T.RowNum <= (@UserBatchNum + 1) * @UserBatchSize; SET @UserBatchNum = @UserBatchNum + 1; - - -- Optional: Print progress - -- PRINT 'Processed User batch ' + CAST(@BatchNum AS VARCHAR(10)) + ' of ' + CAST((@TotalRows - 1) / @BatchSize + 1 AS VARCHAR(10)); END -- Clean up @@ -78,10 +75,7 @@ BEGIN AND T.RowNum <= (@OrganizationBatchNum + 1) * @OrganizationBatchSize; SET @OrganizationBatchNum = @OrganizationBatchNum + 1; - - -- Optional: Print progress - -- PRINT 'Processed Organization batch ' + CAST(@BatchNum AS VARCHAR(10)) + ' of ' + CAST((@TotalRows - 1) / @BatchSize + 1 AS VARCHAR(10)); END -- Clean up -DROP TABLE #TempOrganizationIDs; \ No newline at end of file +DROP TABLE #TempOrganizationIDs; diff --git a/util/MySqlMigrations/Migrations/20240909181805_GenerateDuoSDKVersion4TwoFactorMetadata.cs b/util/MySqlMigrations/Migrations/20240909181805_GenerateDuoSDKVersion4TwoFactorMetadata.cs index ec0d700fc9fc..a112b264a0a6 100644 --- a/util/MySqlMigrations/Migrations/20240909181805_GenerateDuoSDKVersion4TwoFactorMetadata.cs +++ b/util/MySqlMigrations/Migrations/20240909181805_GenerateDuoSDKVersion4TwoFactorMetadata.cs @@ -20,4 +20,3 @@ protected override void Down(MigrationBuilder migrationBuilder) throw new Exception("Irreversible migration"); } } - diff --git a/util/PostgresMigrations/HelperScripts/2024-09-05_00_SyncDuoVersionFourMetadataToVersionTwo.psql b/util/PostgresMigrations/HelperScripts/2024-09-05_00_SyncDuoVersionFourMetadataToVersionTwo.psql index 2c21c963862c..5130301bbbac 100644 --- a/util/PostgresMigrations/HelperScripts/2024-09-05_00_SyncDuoVersionFourMetadataToVersionTwo.psql +++ b/util/PostgresMigrations/HelperScripts/2024-09-05_00_SyncDuoVersionFourMetadataToVersionTwo.psql @@ -24,4 +24,5 @@ set ("TwoFactorProviders"::jsonb -> '6' -> 'MetaData' -> 'IKey')) where "TwoFactorProviders" like '%"6":%' - and jsonb_typeof("TwoFactorProviders"::jsonb) = 'object'; \ No newline at end of file + and jsonb_typeof("TwoFactorProviders"::jsonb) = 'object'; + \ No newline at end of file diff --git a/util/PostgresMigrations/Migrations/20240909181749_GenerateDuoSDKVersion4TwoFactorMetadata.cs b/util/PostgresMigrations/Migrations/20240909181749_GenerateDuoSDKVersion4TwoFactorMetadata.cs index 20f2ff4eff5b..612497c0793d 100644 --- a/util/PostgresMigrations/Migrations/20240909181749_GenerateDuoSDKVersion4TwoFactorMetadata.cs +++ b/util/PostgresMigrations/Migrations/20240909181749_GenerateDuoSDKVersion4TwoFactorMetadata.cs @@ -7,7 +7,7 @@ namespace Bit.PostgresMigrations.Migrations; public partial class GenerateDuoSDKVersion4TwoFactorMetadata : Migration { - private const string _scriptLocation = + private const string _scriptLocation = "PostgresMigrations.HelperScripts.2024-09-05_00_SyncDuoVersionFourMetadataToVersionTwo.psql"; protected override void Up(MigrationBuilder migrationBuilder) diff --git a/util/SqliteMigrations/HelperScripts/2024-09-05_00_SyncDuoVersionFourMetadataToVersionTwo.sql b/util/SqliteMigrations/HelperScripts/2024-09-05_00_SyncDuoVersionFourMetadataToVersionTwo.sql index efe3a87bbf0e..34e12793cd1b 100644 --- a/util/SqliteMigrations/HelperScripts/2024-09-05_00_SyncDuoVersionFourMetadataToVersionTwo.sql +++ b/util/SqliteMigrations/HelperScripts/2024-09-05_00_SyncDuoVersionFourMetadataToVersionTwo.sql @@ -19,7 +19,7 @@ SET TwoFactorProviders = json_set( json_extract("User".TwoFactorProviders, '$."2".MetaData.IKey') ) WHERE TwoFactorProviders LIKE '%"2":%' - AND JSON_VALID(TwoFactorProviders) = 1; + AND JSON_VALID(TwoFactorProviders) = 1; -- Update Organizations UPDATE "Organization" @@ -31,4 +31,5 @@ SET TwoFactorProviders = json_set( json_extract("Organization".TwoFactorProviders, '$."6".MetaData.IKey') ) WHERE TwoFactorProviders LIKE '%"6":%' - AND JSON_VALID(TwoFactorProviders) = 1; \ No newline at end of file + AND JSON_VALID(TwoFactorProviders) = 1; + \ No newline at end of file