Difference between revisions of "Ferreteria/sql/user permit"

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Jump to: navigation, search
(module link)
(WhenEdited)
 
Line 7: Line 7:
 
** '''2017-01-29''' moved from [[VbzCart]] to Ferreteria a few days ago; renamed from uperm to user_permit; changed MYISAM to InnoDB
 
** '''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'''
 
** '''2017-03-25''' added unique key for '''Name'''
 +
** '''2020-01-15''' added '''WhenEdited''' field
 
==SQL==
 
==SQL==
<syntaxhighlight lang=mysql>CREATE TABLE `user_permit` (
+
<source 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 (permit)",
 
   `Descr`    VARCHAR(255) DEFAULT NULL COMMENT "description/usage",
 
   `Descr`    VARCHAR(255) DEFAULT NULL COMMENT "description/usage",
   `WhenCreated` DATETIME      NOT NULL COMMENT "when this uperm was created",
+
   `WhenCreated` DATETIME      NOT NULL COMMENT "when this permit was created",
 +
  `WhenEdited`  DATETIME  DEFAULT NULL COMMENT "when permit was last modified",
 
   PRIMARY KEY(`ID`),
 
   PRIMARY KEY(`ID`),
 
   UNIQUE KEY `Name_UNIQUE` (`Name`)
 
   UNIQUE KEY `Name_UNIQUE` (`Name`)
 
)
 
)
ENGINE = InnoDB;</syntaxhighlight>
+
ENGINE = InnoDB;</source>

Latest revision as of 14:37, 15 January 2020

About

  • Purpose: a list of access permits (permissions) that groups (and therefore users) can have
  • Module: users
  • 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
    • 2020-01-15 added WhenEdited field

SQL

CREATE TABLE `user_permit` (
  `ID`       INT              NOT NULL AUTO_INCREMENT,
  `Name`     VARCHAR(31)      NOT NULL COMMENT "name of permission (permit)",
  `Descr`    VARCHAR(255) DEFAULT NULL COMMENT "description/usage",
  `WhenCreated` DATETIME      NOT NULL COMMENT "when this permit was created",
  `WhenEdited`  DATETIME  DEFAULT NULL COMMENT "when permit was last modified",
  PRIMARY KEY(`ID`),
  UNIQUE KEY `Name_UNIQUE` (`Name`)
)
ENGINE = InnoDB;