diff options
Diffstat (limited to 'db/old_migrations/patch-monitor-tls-info-add-fk.sql')
-rw-r--r-- | db/old_migrations/patch-monitor-tls-info-add-fk.sql | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/db/old_migrations/patch-monitor-tls-info-add-fk.sql b/db/old_migrations/patch-monitor-tls-info-add-fk.sql new file mode 100644 index 0000000..9b9c2d2 --- /dev/null +++ b/db/old_migrations/patch-monitor-tls-info-add-fk.sql @@ -0,0 +1,18 @@ +BEGIN TRANSACTION; + +PRAGMA writable_schema = TRUE; + +UPDATE + SQLITE_MASTER +SET + sql = replace(sql, + 'monitor_id INTEGER NOT NULL', + 'monitor_id INTEGER NOT NULL REFERENCES [monitor] ([id]) ON DELETE CASCADE ON UPDATE CASCADE' +) +WHERE + name = 'monitor_tls_info' + AND type = 'table'; + +PRAGMA writable_schema = RESET; + +COMMIT; |