From 26768b7bf82fd297fafa2638f59e600e7ac093a5 Mon Sep 17 00:00:00 2001 From: Rui Tome Date: Thu, 4 Apr 2024 10:41:49 +0100 Subject: [PATCH] =?UTF-8?q?[AC-1682]=C2=A0Removed=20other=20temp=20table?= =?UTF-8?q?=20drops?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../2024-03-22_00_EnableOrgsCollectionEnhancements.sql | 2 -- .../2024-03-22_00_EnableOrgsCollectionEnhancements.psql | 2 -- .../2024-03-22_00_EnableOrgsCollectionEnhancements.sql | 2 -- 3 files changed, 6 deletions(-) diff --git a/util/MySqlMigrations/HelperScripts/2024-03-22_00_EnableOrgsCollectionEnhancements.sql b/util/MySqlMigrations/HelperScripts/2024-03-22_00_EnableOrgsCollectionEnhancements.sql index 4786e6ba1c..453af272f2 100644 --- a/util/MySqlMigrations/HelperScripts/2024-03-22_00_EnableOrgsCollectionEnhancements.sql +++ b/util/MySqlMigrations/HelperScripts/2024-03-22_00_EnableOrgsCollectionEnhancements.sql @@ -9,7 +9,6 @@ -- Step 2: AccessAll migration for OrganizationUsers -- Create a temporary table to store the OrganizationUsers with AccessAll = 1 - DROP TEMPORARY TABLE IF EXISTS `TempUsersAccessAll`; CREATE TEMPORARY TABLE `TempUsersAccessAll` AS SELECT `OU`.`Id` AS `OrganizationUserId`, `OU`.`OrganizationId` @@ -20,7 +19,6 @@ -- Step 3: For all OrganizationUsers with Manager role or 'EditAssignedCollections' permission update their existing CollectionUsers rows and insert new rows with [Manage] = 1 -- and finally update all OrganizationUsers with Manager role to User role -- Create a temporary table to store the OrganizationUsers with Manager role or 'EditAssignedCollections' permission - DROP TEMPORARY TABLE IF EXISTS `TempUserManagers`; CREATE TEMPORARY TABLE `TempUserManagers` AS SELECT `OU`.`Id` AS `OrganizationUserId`, `OU`.`OrganizationId`, diff --git a/util/PostgresMigrations/HelperScripts/2024-03-22_00_EnableOrgsCollectionEnhancements.psql b/util/PostgresMigrations/HelperScripts/2024-03-22_00_EnableOrgsCollectionEnhancements.psql index 180af8b170..8d10d7d04b 100644 --- a/util/PostgresMigrations/HelperScripts/2024-03-22_00_EnableOrgsCollectionEnhancements.psql +++ b/util/PostgresMigrations/HelperScripts/2024-03-22_00_EnableOrgsCollectionEnhancements.psql @@ -9,7 +9,6 @@ -- Step 2: AccessAll migration for OrganizationUsers -- Create a temporary table to store the OrganizationUsers with AccessAll = true - DROP TABLE IF EXISTS "TempUsersAccessAll"; CREATE TEMPORARY TABLE "TempUsersAccessAll" AS SELECT "OU"."Id" AS "OrganizationUserId", "OU"."OrganizationId" @@ -20,7 +19,6 @@ -- Step 3: For all OrganizationUsers with Manager role or 'EditAssignedCollections' permission update their existing CollectionUsers rows and insert new rows with Manage = 1 -- and finally update all OrganizationUsers with Manager role to User role -- Create a temporary table to store the OrganizationUsers with Manager role or 'EditAssignedCollections' permission - DROP TABLE IF EXISTS "TempUserManagers"; CREATE TEMPORARY TABLE "TempUserManagers" AS SELECT "OU"."Id" AS "OrganizationUserId", "OU"."OrganizationId", diff --git a/util/SqliteMigrations/HelperScripts/2024-03-22_00_EnableOrgsCollectionEnhancements.sql b/util/SqliteMigrations/HelperScripts/2024-03-22_00_EnableOrgsCollectionEnhancements.sql index 8e5084f295..ba25ba1262 100644 --- a/util/SqliteMigrations/HelperScripts/2024-03-22_00_EnableOrgsCollectionEnhancements.sql +++ b/util/SqliteMigrations/HelperScripts/2024-03-22_00_EnableOrgsCollectionEnhancements.sql @@ -9,7 +9,6 @@ -- Step 2: AccessAll migration for OrganizationUsers -- Create a temporary table to store the OrganizationUsers with AccessAll = 1 - DROP TABLE IF EXISTS "TempUsersAccessAll"; CREATE TEMPORARY TABLE "TempUsersAccessAll" AS SELECT "OU"."Id" AS "OrganizationUserId", "OU"."OrganizationId" @@ -20,7 +19,6 @@ -- Step 3: For all OrganizationUsers with Manager role or 'EditAssignedCollections' permission update their existing CollectionUsers rows and insert new rows with [Manage] = 1 -- and finally update all OrganizationUsers with Manager role to User role -- Create a temporary table to store the OrganizationUsers with Manager role or 'EditAssignedCollections' permission - DROP TABLE IF EXISTS "TempUserManagers"; CREATE TEMPORARY TABLE "TempUserManagers" AS SELECT "OU"."Id" AS "OrganizationUserId", "OU"."OrganizationId",