From 55b508057553b49210e97d547c50a5e7cdad9da3 Mon Sep 17 00:00:00 2001 From: jacob Date: Wed, 23 Jun 2010 19:45:33 +0000 Subject: [PATCH] Added new databases for user/role management --- db/db.code.version.txt | 2 +- db/db.update.192.sql | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 db/db.update.192.sql diff --git a/db/db.code.version.txt b/db/db.code.version.txt index 88b2e783..86a03071 100644 --- a/db/db.code.version.txt +++ b/db/db.code.version.txt @@ -1 +1 @@ -191 +192 diff --git a/db/db.update.192.sql b/db/db.update.192.sql new file mode 100644 index 00000000..bdaca61f --- /dev/null +++ b/db/db.update.192.sql @@ -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;