From 68b65105fdb5026e5ecec3eb0ae3d5fe7d8ef19c Mon Sep 17 00:00:00 2001 From: carlossa Date: Wed, 28 Jun 2023 08:02:31 +0200 Subject: [PATCH] refs #5660 role mod --- db/changes/232801/00-deliveryAssistantACL.sql | 8 +++--- .../01-deliveryAssistantInheritRole.sql | 28 ++++--------------- 2 files changed, 9 insertions(+), 27 deletions(-) diff --git a/db/changes/232801/00-deliveryAssistantACL.sql b/db/changes/232801/00-deliveryAssistantACL.sql index e5152087e..94873aece 100644 --- a/db/changes/232801/00-deliveryAssistantACL.sql +++ b/db/changes/232801/00-deliveryAssistantACL.sql @@ -1,7 +1,7 @@ --- Auto-generated SQL script #202306121356 -UPDATE `account`.`role` - SET `description` = 'Asistente de envios' - WHERE `name` = 'deliveryAssistant'; +-- Auto-generated SQL script. Actual values for binary/complex data types may differ - what you see is the default string representation of values. +INSERT INTO `account`.`role` (name,description) + VALUES ('deliveryAssistant','Asistencia de envios'); + diff --git a/db/changes/232801/01-deliveryAssistantInheritRole.sql b/db/changes/232801/01-deliveryAssistantInheritRole.sql index 5b3806fa2..e8146e806 100644 --- a/db/changes/232801/01-deliveryAssistantInheritRole.sql +++ b/db/changes/232801/01-deliveryAssistantInheritRole.sql @@ -1,23 +1,5 @@ --- Auto-generated SQL script #202306121403 -INSERT INTO `account`.`roleInherit` (`role`,inheritsFrom) - VALUES (117,1); -INSERT INTO `account`.`roleInherit` (`role`,inheritsFrom) - VALUES (117,2); -INSERT INTO `account`.`roleInherit` (`role`,inheritsFrom) - VALUES (117,3); -INSERT INTO `account`.`roleInherit` (`role`,inheritsFrom) - VALUES (117,6); -INSERT INTO `account`.`roleInherit` (`role`,inheritsFrom) - VALUES (117,11); -INSERT INTO `account`.`roleInherit` (`role`,inheritsFrom) - VALUES (117,13); -INSERT INTO `account`.`roleInherit` (`role`,inheritsFrom) - VALUES (117,33); -INSERT INTO `account`.`roleInherit` (`role`,inheritsFrom) - VALUES (117,56); -INSERT INTO `account`.`roleInherit` (`role`,inheritsFrom) - VALUES (117,57); -INSERT INTO `account`.`roleInherit` (`role`,inheritsFrom) - VALUES (117,70); -INSERT INTO `account`.`roleInherit` (`role`,inheritsFrom) - VALUES (117,76); +INSERT INTO account.roleInherit + SELECT (SELECT id FROM account.role r WHERE r.name = 'deliveryAssistant'), ri.inheritsFrom + FROM account.roleInherit ri + JOIN account.role r ON r.id = ri.`role` + WHERE r.name = 'deliveryBoss'; \ No newline at end of file