From f7f692cf0857eb2fad125f0b8db2cf4fcbc94059 Mon Sep 17 00:00:00 2001 From: Rui Tome Date: Fri, 16 Feb 2024 12:51:13 +0000 Subject: [PATCH] [AC-1682] Update RevisionDate in Group table --- .../HelperScripts/2024-01-12_00_AccessAllCollectionGroups.sql | 2 +- .../HelperScripts/2024-01-12_00_AccessAllCollectionGroups.psql | 2 +- .../HelperScripts/2024-01-12_00_AccessAllCollectionGroups.sql | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/util/MySqlMigrations/HelperScripts/2024-01-12_00_AccessAllCollectionGroups.sql b/util/MySqlMigrations/HelperScripts/2024-01-12_00_AccessAllCollectionGroups.sql index 49cf4922d5..b93e83a0dd 100644 --- a/util/MySqlMigrations/HelperScripts/2024-01-12_00_AccessAllCollectionGroups.sql +++ b/util/MySqlMigrations/HelperScripts/2024-01-12_00_AccessAllCollectionGroups.sql @@ -33,7 +33,7 @@ WHERE CG.`CollectionId` IS NULL; -- Step 5: Update Group to clear AccessAll flag UPDATE `Group` G INNER JOIN TempGroup TG ON G.`Id` = TG.`GroupId` -SET G.`AccessAll` = 0; +SET G.`AccessAll` = 0, G.`RevisionDate` = UTC_TIMESTAMP(); -- Step 6: Update User AccountRevisionDate for each unique OrganizationUserId UPDATE `User` U diff --git a/util/PostgresMigrations/HelperScripts/2024-01-12_00_AccessAllCollectionGroups.psql b/util/PostgresMigrations/HelperScripts/2024-01-12_00_AccessAllCollectionGroups.psql index 31c064ea5d..ad940f4677 100644 --- a/util/PostgresMigrations/HelperScripts/2024-01-12_00_AccessAllCollectionGroups.psql +++ b/util/PostgresMigrations/HelperScripts/2024-01-12_00_AccessAllCollectionGroups.psql @@ -31,7 +31,7 @@ WHERE CG."CollectionId" IS NULL; -- Step 5: Update Group to clear AccessAll flag UPDATE "Group" G -SET "AccessAll" = false +SET "AccessAll" = false, "RevisionDate" = current_timestamp FROM TempGroup TG WHERE G."Id" = TG."GroupId"; diff --git a/util/SqliteMigrations/HelperScripts/2024-01-12_00_AccessAllCollectionGroups.sql b/util/SqliteMigrations/HelperScripts/2024-01-12_00_AccessAllCollectionGroups.sql index a40ba2b68b..980b8a2dc8 100644 --- a/util/SqliteMigrations/HelperScripts/2024-01-12_00_AccessAllCollectionGroups.sql +++ b/util/SqliteMigrations/HelperScripts/2024-01-12_00_AccessAllCollectionGroups.sql @@ -33,7 +33,7 @@ WHERE CG."CollectionId" IS NULL; -- Step 5: Update Group to clear AccessAll flag UPDATE "Group" -SET "AccessAll" = 0 +SET "AccessAll" = 0, "RevisionDate" = CURRENT_TIMESTAMP WHERE "Id" IN (SELECT "GroupId" FROM TempGroup); -- Step 6: Update User AccountRevisionDate for each unique OrganizationUserId