From 7711679e1a3d7d4842b75ba5376033d011ffb3bd Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Sat, 9 Sep 2023 18:28:53 +0200 Subject: [PATCH] made shure that all databse patches have the db-patch warning (#3624) --- .../patch-add-clickable-status-page-link.sql | 2 ++ db/old_migrations/patch-add-gamedig-monitor.sql | 4 +++- .../patch-add-google-analytics-status-page-tag.sql | 5 ++++- db/old_migrations/patch-add-parent-monitor.sql | 3 ++- db/old_migrations/patch-add-radius-monitor.sql | 3 ++- db/old_migrations/patch-add-timeout-monitor.sql | 3 ++- db/old_migrations/patch-api-key-table.sql | 2 ++ db/old_migrations/patch-ping-packet-size.sql | 2 ++ db/old_migrations/patch-setting-value-type.sql | 1 - db/old_migrations/patch-status-page-footer-css.sql | 11 ++++++++--- db/old_migrations/patch2.sql | 1 + 11 files changed, 28 insertions(+), 9 deletions(-) diff --git a/db/old_migrations/patch-add-clickable-status-page-link.sql b/db/old_migrations/patch-add-clickable-status-page-link.sql index bacd669bd..cd11cdd29 100644 --- a/db/old_migrations/patch-add-clickable-status-page-link.sql +++ b/db/old_migrations/patch-add-clickable-status-page-link.sql @@ -1,5 +1,7 @@ -- You should not modify if this have pushed to Github, unless it does serious wrong with the db. BEGIN TRANSACTION; + ALTER TABLE monitor_group ADD send_url BOOLEAN DEFAULT 0 NOT NULL; + COMMIT; diff --git a/db/old_migrations/patch-add-gamedig-monitor.sql b/db/old_migrations/patch-add-gamedig-monitor.sql index 061bed302..e20a0cdfa 100644 --- a/db/old_migrations/patch-add-gamedig-monitor.sql +++ b/db/old_migrations/patch-add-gamedig-monitor.sql @@ -1,5 +1,7 @@ +-- You should not modify if this have pushed to Github, unless it does serious wrong with the db. BEGIN TRANSACTION; ALTER TABLE monitor ADD game VARCHAR(255); - COMMIT + +COMMIT; diff --git a/db/old_migrations/patch-add-google-analytics-status-page-tag.sql b/db/old_migrations/patch-add-google-analytics-status-page-tag.sql index 5de6ff37b..fe6fa3452 100644 --- a/db/old_migrations/patch-add-google-analytics-status-page-tag.sql +++ b/db/old_migrations/patch-add-google-analytics-status-page-tag.sql @@ -1,4 +1,7 @@ -- You should not modify if this have pushed to Github, unless it does serious wrong with the db. BEGIN TRANSACTION; -ALTER TABLE status_page ADD google_analytics_tag_id VARCHAR; + +ALTER TABLE status_page + ADD google_analytics_tag_id VARCHAR; + COMMIT; diff --git a/db/old_migrations/patch-add-parent-monitor.sql b/db/old_migrations/patch-add-parent-monitor.sql index 756ac5be2..ac2697ff3 100644 --- a/db/old_migrations/patch-add-parent-monitor.sql +++ b/db/old_migrations/patch-add-parent-monitor.sql @@ -1,6 +1,7 @@ +-- You should not modify if this have pushed to Github, unless it does serious wrong with the db. BEGIN TRANSACTION; ALTER TABLE monitor ADD parent INTEGER REFERENCES [monitor] ([id]) ON DELETE SET NULL ON UPDATE CASCADE; -COMMIT +COMMIT; diff --git a/db/old_migrations/patch-add-radius-monitor.sql b/db/old_migrations/patch-add-radius-monitor.sql index 1fd5b44f4..4625f2106 100644 --- a/db/old_migrations/patch-add-radius-monitor.sql +++ b/db/old_migrations/patch-add-radius-monitor.sql @@ -1,3 +1,4 @@ +-- You should not modify if this have pushed to Github, unless it does serious wrong with the db. BEGIN TRANSACTION; ALTER TABLE monitor @@ -15,4 +16,4 @@ ALTER TABLE monitor ALTER TABLE monitor ADD radius_secret VARCHAR(255); -COMMIT +COMMIT; diff --git a/db/old_migrations/patch-add-timeout-monitor.sql b/db/old_migrations/patch-add-timeout-monitor.sql index 32d49d1e2..b62eb1430 100644 --- a/db/old_migrations/patch-add-timeout-monitor.sql +++ b/db/old_migrations/patch-add-timeout-monitor.sql @@ -3,4 +3,5 @@ BEGIN TRANSACTION; ALTER TABLE monitor ADD timeout DOUBLE default 0 not null; -COMMIT; \ No newline at end of file + +COMMIT; diff --git a/db/old_migrations/patch-api-key-table.sql b/db/old_migrations/patch-api-key-table.sql index fc3a405bf..4116db38e 100644 --- a/db/old_migrations/patch-api-key-table.sql +++ b/db/old_migrations/patch-api-key-table.sql @@ -1,5 +1,6 @@ -- You should not modify if this have pushed to Github, unless it does serious wrong with the db. BEGIN TRANSACTION; + CREATE TABLE [api_key] ( [id] INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, [key] VARCHAR(255) NOT NULL, @@ -10,4 +11,5 @@ CREATE TABLE [api_key] ( [expires] DATETIME DEFAULT NULL, CONSTRAINT FK_user FOREIGN KEY ([user_id]) REFERENCES [user]([id]) ON DELETE CASCADE ON UPDATE CASCADE ); + COMMIT; diff --git a/db/old_migrations/patch-ping-packet-size.sql b/db/old_migrations/patch-ping-packet-size.sql index d65ec8ed8..f127fc251 100644 --- a/db/old_migrations/patch-ping-packet-size.sql +++ b/db/old_migrations/patch-ping-packet-size.sql @@ -1,5 +1,7 @@ -- You should not modify if this have pushed to Github, unless it does serious wrong with the db. BEGIN TRANSACTION; + ALTER TABLE monitor ADD packet_size INTEGER DEFAULT 56 NOT NULL; + COMMIT; diff --git a/db/old_migrations/patch-setting-value-type.sql b/db/old_migrations/patch-setting-value-type.sql index 18d6390c3..4816bc60f 100644 --- a/db/old_migrations/patch-setting-value-type.sql +++ b/db/old_migrations/patch-setting-value-type.sql @@ -18,5 +18,4 @@ drop table setting; alter table setting_dg_tmp rename to setting; - COMMIT; diff --git a/db/old_migrations/patch-status-page-footer-css.sql b/db/old_migrations/patch-status-page-footer-css.sql index 413918f11..beef92221 100644 --- a/db/old_migrations/patch-status-page-footer-css.sql +++ b/db/old_migrations/patch-status-page-footer-css.sql @@ -1,6 +1,11 @@ -- You should not modify if this have pushed to Github, unless it does serious wrong with the db. BEGIN TRANSACTION; -ALTER TABLE status_page ADD footer_text TEXT; -ALTER TABLE status_page ADD custom_css TEXT; -ALTER TABLE status_page ADD show_powered_by BOOLEAN NOT NULL DEFAULT 1; + +ALTER TABLE status_page + ADD footer_text TEXT; +ALTER TABLE status_page + ADD custom_css TEXT; +ALTER TABLE status_page + ADD show_powered_by BOOLEAN NOT NULL DEFAULT 1; + COMMIT; diff --git a/db/old_migrations/patch2.sql b/db/old_migrations/patch2.sql index 012d01502..2f34e292c 100644 --- a/db/old_migrations/patch2.sql +++ b/db/old_migrations/patch2.sql @@ -1,3 +1,4 @@ +-- You should not modify if this have pushed to Github, unless it does serious wrong with the db. BEGIN TRANSACTION; CREATE TABLE monitor_tls_info (