Skip to content

Commit

Permalink
Evarisk#3644 [SQL] fix: adjust database to conf name for pp/fp and ac…
Browse files Browse the repository at this point in the history
…cident
  • Loading branch information
evarisk-micka committed Dec 20, 2023
1 parent cf2eabb commit d28a14d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
10 changes: 8 additions & 2 deletions sql/data.sql
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,6 @@ INSERT INTO llx_c_digiriskdolibarr_action_trigger (entity, elementtype, ref, lab
INSERT INTO llx_c_digiriskdolibarr_action_trigger (entity, elementtype, ref, label, description, active, position) VALUES (0, 'firepermit@digiriskdolibarr', 'FIREPERMIT_CREATE', 'FirePermitCreated', 'Executed when a fire permit is created', 1, 320);
INSERT INTO llx_c_digiriskdolibarr_action_trigger (entity, elementtype, ref, label, description, active, position) VALUES (0, 'firepermit@digiriskdolibarr', 'FIREPERMIT_MODIFY', 'FirePermitModified', 'Executed when a fire permit is modified', 1, 330);
INSERT INTO llx_c_digiriskdolibarr_action_trigger (entity, elementtype, ref, label, description, active, position) VALUES (0, 'firepermit@digiriskdolibarr', 'FIREPERMIT_DELETE', 'FirePermitDeleted', 'Executed when a fire permit is deleted', 1, 340);
INSERT INTO llx_c_digiriskdolibarr_action_trigger (entity, elementtype, ref, label, description, active, position) VALUES (0, 'firepermit@digiriskdolibarr', 'FIREPERMIT_INPROGRESS', 'FirePermitInProgress', 'Executed when a fire permit status is in progress', 1, 350);
INSERT INTO llx_c_digiriskdolibarr_action_trigger (entity, elementtype, ref, label, description, active, position) VALUES (0, 'firepermit@digiriskdolibarr', 'FIREPERMIT_PENDINGSIGNATURE', 'FirePermitPendingSignature', 'Executed when a fire permit status is pending signature', 1, 360);
INSERT INTO llx_c_digiriskdolibarr_action_trigger (entity, elementtype, ref, label, description, active, position) VALUES (0, 'firepermit@digiriskdolibarr', 'FIREPERMIT_LOCK', 'FirePermitLocked', 'Executed when a fire permit is locked', 1, 370);
INSERT INTO llx_c_digiriskdolibarr_action_trigger (entity, elementtype, ref, label, description, active, position) VALUES (0, 'firepermit@digiriskdolibarr', 'FIREPERMIT_ARCHIVE', 'FirePermitArchived', 'Executed when a fire permit is archived', 1, 380);
Expand All @@ -872,7 +871,6 @@ INSERT INTO llx_c_digiriskdolibarr_action_trigger (entity, elementtype, ref, lab
INSERT INTO llx_c_digiriskdolibarr_action_trigger (entity, elementtype, ref, label, description, active, position) VALUES (0, 'preventionplan@digiriskdolibarr', 'PREVENTIONPLAN_CREATE', 'PreventionPlanCreated', 'Executed when a prevention plan is created', 1, 430);
INSERT INTO llx_c_digiriskdolibarr_action_trigger (entity, elementtype, ref, label, description, active, position) VALUES (0, 'preventionplan@digiriskdolibarr', 'PREVENTIONPLAN_MODIFY', 'PreventionPlanModified', 'Executed when a prevention plan is modified', 1, 440);
INSERT INTO llx_c_digiriskdolibarr_action_trigger (entity, elementtype, ref, label, description, active, position) VALUES (0, 'preventionplan@digiriskdolibarr', 'PREVENTIONPLAN_DELETE', 'PreventionPlanDeleted', 'Executed when a prevention plan is deleted', 1, 450);
INSERT INTO llx_c_digiriskdolibarr_action_trigger (entity, elementtype, ref, label, description, active, position) VALUES (0, 'preventionplan@digiriskdolibarr', 'PREVENTIONPLAN_INPROGRESS', 'PreventionPlanInProgress', 'Executed when a prevention plan status is in progress', 1, 460);
INSERT INTO llx_c_digiriskdolibarr_action_trigger (entity, elementtype, ref, label, description, active, position) VALUES (0, 'preventionplan@digiriskdolibarr', 'PREVENTIONPLAN_PENDINGSIGNATURE', 'PreventionPlanPendingSignature', 'Executed when a prevention plan status is pending signature', 1, 470);
INSERT INTO llx_c_digiriskdolibarr_action_trigger (entity, elementtype, ref, label, description, active, position) VALUES (0, 'preventionplan@digiriskdolibarr', 'PREVENTIONPLAN_LOCK', 'PreventionPlanLocked', 'Executed when a prevention plan is locked', 1, 480);
INSERT INTO llx_c_digiriskdolibarr_action_trigger (entity, elementtype, ref, label, description, active, position) VALUES (0, 'preventionplan@digiriskdolibarr', 'PREVENTIONPLAN_ARCHIVE', 'PreventionPlanArchived', 'Executed when a prevention plan is archived', 1, 490);
Expand Down Expand Up @@ -903,3 +901,11 @@ INSERT INTO llx_c_digiriskdolibarr_action_trigger (entity, elementtype, ref, lab
-- 9.14.0
INSERT INTO `llx_c_accident_attendants_role` (`rowid`, `entity`, `ref`, `label`, `description`, `active`, `position`) VALUES (1, 0, 'Victim', 'Victim', '', 1, 1);
INSERT INTO `llx_c_accident_attendants_role` (`rowid`, `entity`, `ref`, `label`, `description`, `active`, `position`) VALUES (2, 0, 'Caregiver', 'Caregiver', '', 1, 10);

-- 9.14.1
INSERT INTO llx_c_digiriskdolibarr_action_trigger (entity, elementtype, ref, label, description, active, position) VALUES (0, 'firepermit@digiriskdolibarr', 'FIREPERMIT_UNVALIDATE', 'FirePermitUnValidate', 'Executed when a fire permit is re-open', 1, 350);
INSERT INTO llx_c_digiriskdolibarr_action_trigger (entity, elementtype, ref, label, description, active, position) VALUES (0, 'preventionplan@digiriskdolibarr', 'PREVENTIONPLAN_UNVALIDATE', 'PreventionPlanUnValidate', 'Executed when a prevention plan is re-open', 1, 460);
INSERT INTO llx_c_digiriskdolibarr_action_trigger (entity, elementtype, ref, label, description, active, position) VALUES (0, 'accident@digiriskdolibarr', 'ACCIDENT_VALIDATE', 'AccidentValidated', 'Executed when an accident is validated', 1, 121);
INSERT INTO llx_c_digiriskdolibarr_action_trigger (entity, elementtype, ref, label, description, active, position) VALUES (0, 'accident@digiriskdolibarr', 'ACCIDENT_UNVALIDATE', 'AccidentUnValidated', 'Executed when an accident is re-open', 1, 122);
INSERT INTO llx_c_digiriskdolibarr_action_trigger (entity, elementtype, ref, label, description, active, position) VALUES (0, 'accident@digiriskdolibarr', 'ACCIDENT_ARCHIVE', 'AccidentArchived', 'Executed when an accident is archived', 1, 123);
INSERT INTO llx_c_digiriskdolibarr_action_trigger (entity, elementtype, ref, label, description, active, position) VALUES (0, 'accident@digiriskdolibarr', 'ACCIDENT_LOCK', 'AccidentLocked', 'Executed when an accident is locked', 1, 124);
4 changes: 4 additions & 0 deletions sql/update.sql
Original file line number Diff line number Diff line change
Expand Up @@ -241,3 +241,7 @@ UPDATE llx_digiriskdolibarr_risk SET category = 21 WHERE category = 20;
UPDATE llx_digiriskdolibarr_risk SET category = 22 WHERE category = 21;
ALTER TABLE llx_digiriskdolibarr_accident ADD fk_ticket integer;
ALTER TABLE llx_digiriskdolibarr_accident DROP COLUMN fk_user_victim;

-- 9.14.1
DELETE FROM llx_c_digiriskdolibarr_action_trigger WHERE ref = 'FIREPERMIT_INPROGRESS';
DELETE FROM llx_c_digiriskdolibarr_action_trigger WHERE ref = 'PREVENTIONPLAN_INPROGRESS';

0 comments on commit d28a14d

Please sign in to comment.