diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 11:46:43 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-13 11:46:43 +0000 |
commit | 3e02d5aff85babc3ffbfcf52313f2108e313aa23 (patch) | |
tree | b01f3923360c20a6a504aff42d45670c58af3ec5 /schema/mysql-upgrades | |
parent | Initial commit. (diff) | |
download | icingaweb2-3e02d5aff85babc3ffbfcf52313f2108e313aa23.tar.xz icingaweb2-3e02d5aff85babc3ffbfcf52313f2108e313aa23.zip |
Adding upstream version 2.12.1.upstream/2.12.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | schema/mysql-upgrades/2.0.0beta3-2.0.0rc1.sql | 26 | ||||
-rw-r--r-- | schema/mysql-upgrades/2.11.0.sql | 33 | ||||
-rw-r--r-- | schema/mysql-upgrades/2.12.0.sql | 11 | ||||
-rw-r--r-- | schema/mysql-upgrades/2.5.0.sql | 5 | ||||
-rw-r--r-- | schema/mysql-upgrades/2.9.0.sql | 11 | ||||
-rw-r--r-- | schema/mysql-upgrades/2.9.1.sql | 2 |
6 files changed, 88 insertions, 0 deletions
diff --git a/schema/mysql-upgrades/2.0.0beta3-2.0.0rc1.sql b/schema/mysql-upgrades/2.0.0beta3-2.0.0rc1.sql new file mode 100644 index 0000000..e9d4f86 --- /dev/null +++ b/schema/mysql-upgrades/2.0.0beta3-2.0.0rc1.sql @@ -0,0 +1,26 @@ +# Icinga Web 2 | (c) 2014 Icinga Development Team | GPLv2+ + +DROP TABLE `icingaweb_group_membership`; +DROP TABLE `icingaweb_group`; + +CREATE TABLE `icingaweb_group`( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(64) COLLATE utf8_unicode_ci NOT NULL, + `parent` int(10) unsigned NULL DEFAULT NULL, + `ctime` timestamp NULL DEFAULT NULL, + `mtime` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`id`), + UNIQUE KEY `idx_name` (`name`), + CONSTRAINT `fk_icingaweb_group_parent_id` FOREIGN KEY (`parent`) + REFERENCES `icingaweb_group` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +CREATE TABLE `icingaweb_group_membership`( + `group_id` int(10) unsigned NOT NULL, + `username` varchar(64) COLLATE utf8_unicode_ci NOT NULL, + `ctime` timestamp NULL DEFAULT NULL, + `mtime` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`group_id`,`username`), + CONSTRAINT `fk_icingaweb_group_membership_icingaweb_group` FOREIGN KEY (`group_id`) + REFERENCES `icingaweb_group` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/schema/mysql-upgrades/2.11.0.sql b/schema/mysql-upgrades/2.11.0.sql new file mode 100644 index 0000000..99f18cf --- /dev/null +++ b/schema/mysql-upgrades/2.11.0.sql @@ -0,0 +1,33 @@ +ALTER TABLE `icingaweb_group` ROW_FORMAT=DYNAMIC; +ALTER TABLE `icingaweb_group_membership` ROW_FORMAT=DYNAMIC; +ALTER TABLE `icingaweb_user` ROW_FORMAT=DYNAMIC; +ALTER TABLE `icingaweb_user_preference` ROW_FORMAT=DYNAMIC; +ALTER TABLE `icingaweb_rememberme` ROW_FORMAT=DYNAMIC; + +ALTER TABLE `icingaweb_group` CONVERT TO CHARACTER SET utf8mb4; +ALTER TABLE `icingaweb_group_membership` CONVERT TO CHARACTER SET utf8mb4; +ALTER TABLE `icingaweb_user` CONVERT TO CHARACTER SET utf8mb4; +ALTER TABLE `icingaweb_user_preference` CONVERT TO CHARACTER SET utf8mb4; + +ALTER TABLE `icingaweb_group` + MODIFY COLUMN `name` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL; +ALTER TABLE `icingaweb_group_membership` + MODIFY COLUMN `username` varchar(254) COLLATE utf8mb4_unicode_ci NOT NULL; +ALTER TABLE `icingaweb_user` + MODIFY COLUMN `name` varchar(254) COLLATE utf8mb4_unicode_ci NOT NULL; + +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 ROW_FORMAT=DYNAMIC; + +INSERT INTO icingaweb_schema (version, timestamp) + VALUES (6, UNIX_TIMESTAMP()); 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); diff --git a/schema/mysql-upgrades/2.5.0.sql b/schema/mysql-upgrades/2.5.0.sql new file mode 100644 index 0000000..08a05c0 --- /dev/null +++ b/schema/mysql-upgrades/2.5.0.sql @@ -0,0 +1,5 @@ +# Icinga Web 2 | (c) 2017 Icinga Development Team | GPLv2+ + +ALTER TABLE `icingaweb_group_membership` MODIFY COLUMN `username` varchar(254) COLLATE utf8_unicode_ci NOT NULL; +ALTER TABLE `icingaweb_user` MODIFY COLUMN `name` varchar(254) COLLATE utf8_unicode_ci NOT NULL; +ALTER TABLE `icingaweb_user_preference` MODIFY COLUMN `username` varchar(254) COLLATE utf8_unicode_ci NOT NULL; diff --git a/schema/mysql-upgrades/2.9.0.sql b/schema/mysql-upgrades/2.9.0.sql new file mode 100644 index 0000000..7ed7ad6 --- /dev/null +++ b/schema/mysql-upgrades/2.9.0.sql @@ -0,0 +1,11 @@ +CREATE TABLE `icingaweb_rememberme`( + id int(10) unsigned NOT NULL AUTO_INCREMENT, + username varchar(254) COLLATE utf8mb4_unicode_ci NOT NULL, + passphrase varchar(256) NOT NULL, + random_iv varchar(24) NOT NULL, + http_user_agent text NOT NULL, + expires_at timestamp NULL DEFAULT NULL, + ctime timestamp NULL DEFAULT NULL, + mtime timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (id) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin; diff --git a/schema/mysql-upgrades/2.9.1.sql b/schema/mysql-upgrades/2.9.1.sql new file mode 100644 index 0000000..a7af6ce --- /dev/null +++ b/schema/mysql-upgrades/2.9.1.sql @@ -0,0 +1,2 @@ +ALTER TABLE `icingaweb_rememberme` + MODIFY random_iv varchar(32) NOT NULL; |