fix(db): make migration 009 foreign key handling transaction-safe
This commit is contained in:
parent
941bde4f7c
commit
159ed59b5a
1 changed files with 4 additions and 4 deletions
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue