fix(db): make migration 009 foreign key handling transaction-safe

This commit is contained in:
thibaud-lclr 2026-04-17 14:49:25 +02:00
parent 941bde4f7c
commit 159ed59b5a

View file

@ -1,7 +1,7 @@
BEGIN;
PRAGMA foreign_keys = OFF; PRAGMA foreign_keys = OFF;
BEGIN;
DROP INDEX IF EXISTS idx_processed_tickets_tracker_artifact_unique; DROP INDEX IF EXISTS idx_processed_tickets_tracker_artifact_unique;
CREATE TABLE processed_tickets_new ( CREATE TABLE processed_tickets_new (
@ -122,6 +122,6 @@ CREATE TABLE graylog_detections (
CREATE INDEX idx_graylog_detections_subject_created CREATE INDEX idx_graylog_detections_subject_created
ON graylog_detections(subject_id, created_at DESC); ON graylog_detections(subject_id, created_at DESC);
PRAGMA foreign_keys = ON;
COMMIT; COMMIT;
PRAGMA foreign_keys = ON;