science-ation/db/db.update.192.sql
2010-06-23 19:58:33 +00:00

27 lines
859 B
SQL

CREATE TABLE `accounts` (
`id` INT NOT NULL ,
`username` VARCHAR( 64 ) NOT NULL ,
`password` VARCHAR( 64 ) NOT NULL ,
`email` VARCHAR( 256 ) NULL ,
PRIMARY KEY ( `id` ) ,
UNIQUE ( `username` )
) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE TABLE `roles` (
`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`roletype` VARCHAR( 256 ) NOT NULL ,
`rolename` VARCHAR( 256 ) NOT NULL ,
UNIQUE ( `roletype` )
) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE TABLE `user_roles` (
`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`accounts_id` INT NOT NULL ,
`users_id` INT NOT NULL ,
`conferences_id` INT NOT NULL ,
`roles_id` INT NOT NULL ,
`active` ENUM( 'no', 'yes' ) NOT NULL DEFAULT 'yes',
`complete` ENUM( 'no', 'yes' ) NOT NULL DEFAULT 'no'
) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci;