fix: add DROP TRIGGER IF EXISTS before CREATE TRIGGER for idempotent re-runs #2

Merged
sagar.patil merged 1 commits from bugfix/hadesSql into main 2026-03-12 07:15:48 +00:00

1 Commits

Author SHA1 Message Date
077835d68e fix: add DROP TRIGGER IF EXISTS before CREATE TRIGGER for idempotent re-runs
- MySQL 5.7 does not support CREATE TRIGGER IF NOT EXISTS
- Add DROP TRIGGER IF EXISTS before each CREATE TRIGGER in 004_hades.sql (69 triggers) and 002_dump.sql (90 triggers)
- DROP TRIGGER only removes trigger definition, does not affect table data
- Fixes ERROR 1359 (Trigger already exists) when dbinit Job runs multiple times

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 12:44:51 +05:30