Skip to content

Commit

Permalink
schema/mysql: Add user and user_preference tables
Browse files Browse the repository at this point in the history
  • Loading branch information
lippserd committed Oct 20, 2014
1 parent 1bb3a58 commit c2a3770
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion etc/schema/mysql.schema.sql
Expand Up @@ -11,5 +11,25 @@ CREATE TABLE `icingaweb_group_membership`(
`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_name`,`username`)
PRIMARY KEY (`group_name`,`username`),
CONSTRAINT `fk_icingaweb_group_membership_icingaweb_group` FOREIGN KEY (`group_name`)
REFERENCES `icingaweb_group` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `icingaweb_user`(
`name` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
`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`(
`username` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
`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,
PRIMARY KEY (`username`,`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

0 comments on commit c2a3770

Please sign in to comment.