Ferreteria/sql/user permit: Difference between revisions
< Ferreteria | sql
Jump to navigation
Jump to search
(unique key) |
m (updated syntax highlight tags) |
||
Line 7: | Line 7: | ||
** '''2017-03-25''' added unique key for '''Name''' | ** '''2017-03-25''' added unique key for '''Name''' | ||
==SQL== | ==SQL== | ||
<mysql>CREATE TABLE `user_permit` ( | <syntaxhighlight lang=mysql>CREATE TABLE `user_permit` ( | ||
`ID` INT NOT NULL AUTO_INCREMENT, | `ID` INT NOT NULL AUTO_INCREMENT, | ||
`Name` VARCHAR(31) NOT NULL COMMENT "name of permission", | `Name` VARCHAR(31) NOT NULL COMMENT "name of permission", | ||
Line 15: | Line 15: | ||
UNIQUE KEY `Name_UNIQUE` (`Name`) | UNIQUE KEY `Name_UNIQUE` (`Name`) | ||
) | ) | ||
ENGINE = InnoDB;</ | ENGINE = InnoDB;</syntaxhighlight> |
Revision as of 15:57, 8 November 2018
About
- Purpose: a list of access permits (permissions) that groups (and therefore users) can have
- Used by: ugroup_x_upermit
- History:
- 2013-11-27 written
- 2017-01-29 moved from VbzCart to Ferreteria a few days ago; renamed from uperm to user_permit; changed MYISAM to InnoDB
- 2017-03-25 added unique key for Name
SQL
CREATE TABLE `user_permit` (
`ID` INT NOT NULL AUTO_INCREMENT,
`Name` VARCHAR(31) NOT NULL COMMENT "name of permission",
`Descr` VARCHAR(255) DEFAULT NULL COMMENT "description/usage",
`WhenCreated` DATETIME NOT NULL COMMENT "when this uperm was created",
PRIMARY KEY(`ID`),
UNIQUE KEY `Name_UNIQUE` (`Name`)
)
ENGINE = InnoDB;