Ferreteria/v0.5/sql/user account: Difference between revisions

From Woozle Writes Code
< Ferreteria‎ | v0.5‎ | sql
Jump to navigation Jump to search
No edit summary
m (6 revisions imported: moving this project here)
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
This table is used by the {{l/ver|login}} system.
==History==
==History==
* '''2022-03-17''' (Note) I feel like "UserName" is ambiguous. Maybe "AcctName"? "LoginName"?
* '''2022-03-17''' (Note) I feel like "UserName" is ambiguous. Maybe "AcctName"? "LoginName"?

Latest revision as of 16:45, 22 May 2022

This table is used by the login system.

History

  • 2022-03-17 (Note) I feel like "UserName" is ambiguous. Maybe "AcctName"? "LoginName"?
  • 2022-03-23 Changed "UserName" to "LoginSlug". Added "WhenLogin", "WhenUsed', "WhenLogout".

SQL

CREATE TABLE `user_account` (
  `ID` int NOT NULL AUTO_INCREMENT,
  `LoginSlug`   varchar(31)      NOT NULL COMMENT 'log in ID',
  `FullName`    varchar(127) DEFAULT NULL COMMENT 'optional ''real'' name',
  `PassHash`    varbinary(128)   NOT NULL COMMENT 'hash for [password+salt]',
  `PassSalt`    varbinary(128)   NOT NULL COMMENT 'random prefix for hashing password',
  `EmailAddr`   varchar(255)     NOT NULL COMMENT 'email address',
  `WhenCreated` datetime         NOT NULL COMMENT 'when user was created',
  `WhenLogin`   datetime     DEFAULT NULL COMMENT 'time of last successful login',
  `WhenUsed`    datetime     DEFAULT NULL COMMENT 'time when account was last accessed',
  `WhenLogout`  datetime     DEFAULT NULL COMMENT 'time of last explicit logout'
  PRIMARY KEY (`ID`),
  UNIQUE KEY `LoginSlug` (`LoginSlug`)
) ENGINE=InnoDB;