From d4196fe472b7855f301f0fe50be0d8a68f74e258 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pascal=20R=C3=B6ssler?= <pascal.roessler@math.uzh.ch> Date: Thu, 18 Aug 2022 10:13:41 +0200 Subject: [PATCH] Changed Table Person, to include index and auto increment + authExpire default Null --- Documentation/UseCase.rst | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Documentation/UseCase.rst b/Documentation/UseCase.rst index 6268a3365..7edf32470 100644 --- a/Documentation/UseCase.rst +++ b/Documentation/UseCase.rst @@ -85,15 +85,18 @@ Table: Person :: CREATE TABLE `Person` ( - `id` int(11) UNSIGNED NOT NULL, + `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, `lastName` varchar(64) NOT NULL DEFAULT '', `firstName` varchar(64) NOT NULL DEFAULT '', `email` varchar(128) NOT NULL, `account` varchar(128) NOT NULL, `auth` varchar(32) NOT NULL, - `authExpire` datetime NOT NULL, + `authExpire` datetime DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 PACK_KEYS=1; + ALTER TABLE `Person` ADD PRIMARY KEY (`id`); + + Registration ^^^^^^^^^^^^ @@ -372,4 +375,4 @@ Form 'passwordSet':: "parameter": "slaveId={{SELECT fe.uid FROM {{dbNameT3:Y}}.fe_users AS fe WHERE fe.username='{{email:RE}}' AND fe.username!='' AND fe.deleted=0 LIMIT 1}}\r\n\r\n# Create FE User. Please update values of `pid`, `usergroup` to your setup.\r\nsqlInsert = {{INSERT INTO {{dbNameT3:Y}}.fe_users ( `pid`, `usergroup`, `username`, `email`, `name`, `password`,`crdate`) VALUES ( 5 , 1 , '{{email:RE}}', '{{email:RE}}', '{{lastName:RE}}, {{firstName:RE}}', '{{myValue:FE:all:p}}', UNIX_TIMESTAMP() ) }}\r\n\r\nsqlUpdate = {{UPDATE {{dbNameT3:Y}}.fe_users SET password='{{myValue:FE:all:p}}' WHERE uid={{slaveId:V0}} }}\r\n\r\nsqlAfter={{UPDATE Person SET authExpire=0 WHERE id={{id:R}} }}" } ] - } \ No newline at end of file + } -- GitLab