forked from science-ation/science-ation
Added new databases for user/role management
This commit is contained in:
parent
4faa4b8dc4
commit
55b5080575
@ -1 +1 @@
|
|||||||
191
|
192
|
||||||
|
25
db/db.update.192.sql
Normal file
25
db/db.update.192.sql
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
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 ,
|
||||||
|
`role_type` VARCHAR( 256 ) NOT NULL ,
|
||||||
|
`role_name` VARCHAR( 256 ) NOT NULL ,
|
||||||
|
UNIQUE ( `role_type` )
|
||||||
|
) 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;
|
Loading…
x
Reference in New Issue
Block a user