mirror of
https://github.com/bitwarden/server
synced 2025-12-11 05:43:35 +00:00
[AC-1682] Removed MySql transaction from script because EF migration already wraps it under its own transaction
This commit is contained in:
@@ -33,8 +33,6 @@
|
||||
`OU`.`Permissions` IS NOT NULL AND
|
||||
JSON_VALID(`OU`.`Permissions`) AND JSON_VALUE(`OU`.`Permissions`, '$.editAssignedCollections') = 'true'));
|
||||
|
||||
-- Start transaction
|
||||
START TRANSACTION;
|
||||
-- Step 1
|
||||
-- Update existing rows in `CollectionGroups`
|
||||
UPDATE `CollectionGroups` `CG`
|
||||
@@ -132,15 +130,11 @@ START TRANSACTION;
|
||||
) AS `CombinedOrgUsers` ON `OU`.`Id` = `CombinedOrgUsers`.`OrganizationUserId`
|
||||
SET `U`.`AccountRevisionDate` = UTC_TIMESTAMP();
|
||||
|
||||
-- Step 5
|
||||
-- Set `FlexibleCollections` = 1 for all organizations that have not yet been migrated.
|
||||
-- Step 5: Set `FlexibleCollections` = 1 for all organizations that have not yet been migrated.
|
||||
UPDATE `Organization`
|
||||
SET `FlexibleCollections` = 1
|
||||
WHERE `FlexibleCollections` = 0;
|
||||
|
||||
-- Commit transaction
|
||||
COMMIT;
|
||||
|
||||
-- Step 6: Drop the temporary tables
|
||||
DROP TEMPORARY TABLE IF EXISTS `TempGroupsAccessAll`;
|
||||
DROP TEMPORARY TABLE IF EXISTS `TempUsersAccessAll`;
|
||||
|
||||
@@ -123,8 +123,7 @@
|
||||
SELECT "OrganizationUserId" FROM "TempUserManagers"
|
||||
);
|
||||
|
||||
-- Step 5
|
||||
-- Set "FlexibleCollections" = true for all organizations that have not yet been migrated.
|
||||
-- Step 5: Set "FlexibleCollections" = true for all organizations that have not yet been migrated.
|
||||
UPDATE "Organization"
|
||||
SET "FlexibleCollections" = true
|
||||
WHERE "FlexibleCollections" = false;
|
||||
|
||||
@@ -141,8 +141,7 @@
|
||||
) AS "CombinedOrgUsers" ON "OU"."Id" = "CombinedOrgUsers"."OrganizationUserId"
|
||||
);
|
||||
|
||||
-- Step 5
|
||||
-- Set "FlexibleCollections" = 1 for all organizations that have not yet been migrated.
|
||||
-- Step 5: Set "FlexibleCollections" = 1 for all organizations that have not yet been migrated.
|
||||
UPDATE "Organization"
|
||||
SET "FlexibleCollections" = 1
|
||||
WHERE "FlexibleCollections" = 0;
|
||||
|
||||
Reference in New Issue
Block a user