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
Collaborator
  • 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

- 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>
sagar.patil added 1 commit 2026-03-12 07:15:41 +00:00
- 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>
sagar.patil merged commit f75b733465 into main 2026-03-12 07:15:48 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: gitea_admin/hades-chart#2
No description provided.