X-Git-Url: https://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=sql%2Fsql.d%2F001-struct.sql;h=3639258c21c3d1102a940c5ec85188efa83e8da6;hb=abe1151407fb084089a8dfa12ea081b95630a1fd;hp=a95af6b4df3dfb120e1669fe90b36f01aeff685d;hpb=67f2611bf53de72c2e7d29db1f8e983238a97ca6;p=brisk.git diff --git a/sql/sql.d/001-struct.sql b/sql/sql.d/001-struct.sql index a95af6b..3639258 100644 --- a/sql/sql.d/001-struct.sql +++ b/sql/sql.d/001-struct.sql @@ -4,15 +4,19 @@ DROP TABLE #PFX#users; CREATE TABLE #PFX#users ( - code integer PRIMARY KEY, - login text, - pass text, - email text, - type integer - ); + code SERIAL PRIMARY KEY, + login text UNIQUE, + pass text, + email text UNIQUE, + type integer, + tsusp timestamp DEFAULT to_timestamp(0) -- disable timeout + mtime timestamp DEFAULT to_timestamp(0) -- last access + ); DROP TABLE #PFX#groups; CREATE TABLE #PFX#groups ( - code integer PRIMARY KEY, - gname text - ); + code SERIAL PRIMARY KEY, + name text + ); + +