Login   Register  
PHP Classes
elePHPant
Icontem

File: sql/sqlite.sql

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Abius X  >  PHP RBAC Class  >  sql/sqlite.sql  >  Download  
File: sql/sqlite.sql
Role: Auxiliary data
Content type: text/plain
Description: sqlite base sql
Class: PHP RBAC Class
Role Based Access Control based on NIST Level 2
Author: By
Last change:
Date: 1 year ago
Size: 758 bytes
 

Contents

Class file image Download
CREATE TABLE `PREFIX_permissions` (
  `ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
  `Lft` INTEGER NOT NULL,
  `Rght` INTEGER NOT NULL,
  `Title` char(64) NOT NULL,
  `Description` text NOT NULL
);

CREATE TABLE `PREFIX_rolepermissions` (
  `RoleID` INTEGER NOT NULL,
  `PermissionID` INTEGER NOT NULL,
  `AssignmentDate` INTEGER NOT NULL,
  PRIMARY KEY  (`RoleID`,`PermissionID`)
);

CREATE TABLE `PREFIX_roles` (
  `ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
  `Lft` INTEGER NOT NULL,
  `Rght` INTEGER NOT NULL,
  `Title` varchar(128) NOT NULL,
  `Description` text NOT NULL
);

CREATE TABLE `PREFIX_userroles` (
  `UserID` INTEGER NOT NULL,
  `RoleID` INTEGER NOT NULL,
  `AssignmentDate` INTEGER NOT NULL,
  PRIMARY KEY  (`UserID`,`RoleID`)
);