mysql: Add table `icingaweb_schema`

Co-authored-by: Eric Lippmann <eric.lippmann@icinga.com>
This commit is contained in:
Johannes Meyer 2022-06-29 15:50:45 +02:00 committed by Eric Lippmann
parent 2a24f69fd8
commit 656f39b9db
2 changed files with 23 additions and 1 deletions

View File

@ -14,3 +14,14 @@ ALTER TABLE `icingaweb_user_preference`
MODIFY COLUMN `username` varchar(254) COLLATE utf8mb4_unicode_ci NOT NULL,
MODIFY COLUMN `section` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,
MODIFY COLUMN `name` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL;
CREATE TABLE icingaweb_schema (
id int unsigned NOT NULL AUTO_INCREMENT,
version smallint unsigned NOT NULL,
timestamp int unsigned NOT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
INSERT INTO icingaweb_schema (version, timestamp)
VALUES (6, UNIX_TIMESTAMP());

View File

@ -1,4 +1,4 @@
# Icinga Web 2 | (c) 2014 Icinga Development Team | GPLv2+
# Icinga Web 2 | (c) 2014 Icinga GmbH | GPLv2+
CREATE TABLE `icingaweb_group`(
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
@ -52,3 +52,14 @@ CREATE TABLE `icingaweb_rememberme`(
mtime timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
CREATE TABLE icingaweb_schema (
id int unsigned NOT NULL AUTO_INCREMENT,
version smallint unsigned NOT NULL,
timestamp int unsigned NOT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
INSERT INTO icingaweb_schema (version, timestamp)
VALUES (6, UNIX_TIMESTAMP());