summaryrefslogtreecommitdiffstats
path: root/schema/mysql-upgrades/2.12.0.sql
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--schema/mysql-upgrades/2.12.0.sql11
1 files changed, 11 insertions, 0 deletions
diff --git a/schema/mysql-upgrades/2.12.0.sql b/schema/mysql-upgrades/2.12.0.sql
new file mode 100644
index 0000000..f2630ac
--- /dev/null
+++ b/schema/mysql-upgrades/2.12.0.sql
@@ -0,0 +1,11 @@
+ALTER TABLE icingaweb_schema
+ MODIFY COLUMN timestamp bigint unsigned NOT NULL,
+ MODIFY COLUMN version varchar(64) NOT NULL,
+ ADD COLUMN success enum('n', 'y') DEFAULT NULL,
+ ADD COLUMN reason text DEFAULT NULL,
+ ADD CONSTRAINT idx_icingaweb_schema_version UNIQUE (version);
+
+UPDATE icingaweb_schema SET timestamp = timestamp * 1000, success = 'y';
+
+INSERT INTO icingaweb_schema (version, timestamp, success, reason)
+ VALUES('2.12.0', UNIX_TIMESTAMP() * 1000, 'y', NULL);