From 060a8b6a69d7eb82a80e7bd458c2a73fea984523 Mon Sep 17 00:00:00 2001 From: Niyas Date: Sat, 14 Aug 2021 08:14:50 +0530 Subject: [PATCH] Adds http_code to heartbeat --- db/patch7.sql | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 db/patch7.sql diff --git a/db/patch7.sql b/db/patch7.sql new file mode 100644 index 000000000..a2c03591f --- /dev/null +++ b/db/patch7.sql @@ -0,0 +1,49 @@ +-- You should not modify if this have pushed to Github, unless it does serious wrong with the db. +PRAGMA foreign_keys = off; + +BEGIN TRANSACTION; + +create table heartbeat_dg_tmp +( + id INTEGER not null primary key autoincrement, + important INTEGER default 0 not null, + monitor_id INTEGER default 0 not null, + status INTEGER default 0 not null, + msg TEXT, + time DATETIME not null, + ping INTEGER default 0, + duration INTEGER default 0 not null, + http_code INTEGER default 0 +); + +insert into + heartbeat_dg_tmp( + id, + important, + monitor_id, + status, + msg, + time, + ping, + duration + ) +select + id, + important, + monitor_id, + status, + msg, + time, + ping, + duration +from + heartbeat; + +drop table heartbeat; + +alter table + heartbeat_dg_tmp rename to heartbeat; + +COMMIT; + +PRAGMA foreign_keys = on;