Skip to content

Commit

Permalink
Evarisk#3684 [SQL] fix: backward delete duplicate
Browse files Browse the repository at this point in the history
  • Loading branch information
evarisk-micka committed Mar 20, 2024
1 parent 7bea401 commit ddd4d70
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sql/update.sql
Original file line number Diff line number Diff line change
Expand Up @@ -245,3 +245,7 @@ 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';

-- 9.15.0
-- Check if ref are duplicate and delete them
DELETE t1 FROM llx_c_digiriskdolibarr_action_trigger t1 JOIN llx_c_digiriskdolibarr_action_trigger t2 WHERE t1.rowid > t2.rowid AND t1.ref = t2.ref;

0 comments on commit ddd4d70

Please sign in to comment.