aboutsummaryrefslogtreecommitdiff
path: root/schema
diff options
context:
space:
mode:
authorGibheer <gibheer+git@zero-knowledge.org>2021-12-02 17:54:14 +0100
committerGibheer <gibheer+git@zero-knowledge.org>2021-12-02 17:54:14 +0100
commitfa05045d31c05c8928020f05f1d281901d983b2b (patch)
tree2ed3bac60302bfb14535a169f4b3e10d18fc6120 /schema
parent41d4805d584161ca16b8187194385e47c36422a6 (diff)
cmd/monfront - import monfront from separate repository
This is the import from the separate monfront repository. The history could not be imported, but this should suffice.
Diffstat (limited to 'schema')
-rw-r--r--schema/20190528.sql1
-rw-r--r--schema/20190812.sql14
-rw-r--r--schema/20190910.sql3
3 files changed, 18 insertions, 0 deletions
diff --git a/schema/20190528.sql b/schema/20190528.sql
new file mode 100644
index 0000000..f4d6934
--- /dev/null
+++ b/schema/20190528.sql
@@ -0,0 +1 @@
+alter table active_checks add state_since timestamp with time zone default now() not null;
diff --git a/schema/20190812.sql b/schema/20190812.sql
new file mode 100644
index 0000000..297a3e7
--- /dev/null
+++ b/schema/20190812.sql
@@ -0,0 +1,14 @@
+create table checkers(
+ id serial not null primary key,
+ name text not null unique,
+ description text
+);
+
+insert into checkers(name, description) values ('moncheck', 'moncheck provides a nagios compatible API to run checks. It calls binaries, which control the alarm state by their exit code.');
+
+alter table checks add checker_id integer not null default 1
+ references checkers(id) on delete cascade;
+alter table checks alter checker_id drop default;
+alter table active_checks add checker_id integer not null default 1
+ references checkers(id) on delete cascade;
+alter table active_checks alter checker_id drop default;
diff --git a/schema/20190910.sql b/schema/20190910.sql
new file mode 100644
index 0000000..3e452c4
--- /dev/null
+++ b/schema/20190910.sql
@@ -0,0 +1,3 @@
+-- add check instance name field
+alter table checks add name text not null default 'none';
+alter table checks alter name drop default;