2016-02-08 15:41:00 +01:00
|
|
|
# Icinga Web 2 | (c) 2014 Icinga Development Team | GPLv2+
|
2015-02-03 16:27:59 +01:00
|
|
|
|
2014-10-20 15:37:50 +02:00
|
|
|
CREATE TABLE `icingaweb_group`(
|
2015-05-28 15:00:46 +02:00
|
|
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
2014-10-20 15:37:50 +02:00
|
|
|
`name` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
|
2015-05-29 08:54:32 +02:00
|
|
|
`parent` int(10) unsigned NULL DEFAULT NULL,
|
2014-10-20 15:37:50 +02:00
|
|
|
`ctime` timestamp NULL DEFAULT NULL,
|
|
|
|
`mtime` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
|
2015-05-28 15:00:46 +02:00
|
|
|
PRIMARY KEY (`id`),
|
2015-05-29 08:54:32 +02:00
|
|
|
UNIQUE KEY `idx_name` (`name`),
|
|
|
|
CONSTRAINT `fk_icingaweb_group_parent_id` FOREIGN KEY (`parent`)
|
|
|
|
REFERENCES `icingaweb_group` (`id`)
|
2014-10-20 15:37:50 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
|
|
|
|
|
|
|
CREATE TABLE `icingaweb_group_membership`(
|
2015-05-28 15:00:46 +02:00
|
|
|
`group_id` int(10) unsigned NOT NULL,
|
2017-06-07 15:52:41 +02:00
|
|
|
`username` varchar(254) COLLATE utf8_unicode_ci NOT NULL,
|
2014-10-20 15:37:50 +02:00
|
|
|
`ctime` timestamp NULL DEFAULT NULL,
|
|
|
|
`mtime` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
|
2015-05-28 15:00:46 +02:00
|
|
|
PRIMARY KEY (`group_id`,`username`),
|
|
|
|
CONSTRAINT `fk_icingaweb_group_membership_icingaweb_group` FOREIGN KEY (`group_id`)
|
|
|
|
REFERENCES `icingaweb_group` (`id`)
|
2014-10-20 16:32:31 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
|
|
|
|
|
|
|
CREATE TABLE `icingaweb_user`(
|
2017-06-07 15:52:41 +02:00
|
|
|
`name` varchar(254) COLLATE utf8_unicode_ci NOT NULL,
|
2014-10-20 16:32:31 +02:00
|
|
|
`active` tinyint(1) NOT NULL,
|
|
|
|
`password_hash` varbinary(255) NOT NULL,
|
|
|
|
`ctime` timestamp NULL DEFAULT NULL,
|
|
|
|
`mtime` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
|
|
|
|
PRIMARY KEY (`name`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
|
|
|
|
|
|
|
CREATE TABLE `icingaweb_user_preference`(
|
2017-06-07 15:52:41 +02:00
|
|
|
`username` varchar(254) COLLATE utf8_unicode_ci NOT NULL,
|
2014-11-12 10:49:46 +01:00
|
|
|
`section` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
|
2014-10-20 16:32:31 +02:00
|
|
|
`name` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
|
|
|
|
`value` varchar(255) NOT NULL,
|
|
|
|
`ctime` timestamp NULL DEFAULT NULL,
|
|
|
|
`mtime` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
|
2014-11-12 10:49:46 +01:00
|
|
|
PRIMARY KEY (`username`,`section`,`name`)
|
2014-10-20 15:37:50 +02:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
2021-05-21 15:43:06 +02:00
|
|
|
|
|
|
|
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,
|
2021-07-26 17:37:38 +02:00
|
|
|
random_iv varchar(32) NOT NULL,
|
2021-05-21 15:43:06 +02:00
|
|
|
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;
|