Created
February 3, 2012 14:48
-
-
Save gautamk/1730506 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE `user_resources` ( | |
`id` INT NOT NULL AUTO_INCREMENT | |
, `name` VARCHAR(255) | |
, `description` VARCHAR(255) | |
, `parentId` INT DEFAULT NULL | |
, PRIMARY KEY (`id`) | |
); | |
CREATE TABLE `user_roles` ( | |
`id` INT NOT NULL AUTO_INCREMENT | |
, `name` VARCHAR(255) NOT NULL | |
, `description` VARCHAR(255) | |
, `parentId` INT DEFAULT NULL | |
, PRIMARY KEY (`id`) | |
); | |
CREATE TABLE `user_permissions` ( | |
`id` INT NOT NULL AUTO_INCREMENT | |
, `role` INT | |
, `resource` INT | |
, `read` BOOLEAN DEFAULT FALSE | |
, `write` BOOLEAN DEFAULT FALSE | |
, `modify` BOOLEAN DEFAULT FALSE | |
, `delete` BOOLEAN DEFAULT FALSE | |
, `publish` BOOLEAN DEFAULT FALSE | |
, `description` VARCHAR(255) | |
, PRIMARY KEY (`id`) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment