diff --git a/db/changes/233801/01-deliveryAssistantACL.sql b/db/changes/233801/01-deliveryAssistantACL.sql index 22ee9d796..34acf2427 100644 --- a/db/changes/233801/01-deliveryAssistantACL.sql +++ b/db/changes/233801/01-deliveryAssistantACL.sql @@ -1,21 +1,18 @@ -- 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'); - -INSERT INTO `account`.`roleInherit` (role,inheritsFrom) - 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'; + VALUES ('deliveryAssistant','Jefe auxiliar repartos'); +INSERT INTO `account`.`roleInherit` (role, inheritsFrom) + SELECT (SELECT id FROM account.role r1 WHERE r1.name = 'deliveryAssistant'), ri.inheritsFrom +FROM account.roleInherit ri + JOIN account.role r2 ON r2.id = ri.`role` +WHERE r2.name = 'deliveryBoss'; DELETE FROM `account`.`roleInherit` WHERE role = 57; - + INSERT INTO `account`.`roleInherit` (role, inheritsFrom) - SELECT (SELECT id FROM account.role WHERE name = 'deliveryBoss') role, + SELECT (SELECT id FROM account.role WHERE name = 'deliveryBoss') role, (SELECT id FROM account.role WHERE name = 'deliveryAssistant') roleInherit; CALL account.role_syncPrivileges(); - -