projects
/
brisk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
reduced log
[brisk.git]
/
sql
/
sql.d
/
001-struct.sql
diff --git
a/sql/sql.d/001-struct.sql
b/sql/sql.d/001-struct.sql
index
024d58f
..
fa1dc86
100644
(file)
--- a/
sql/sql.d/001-struct.sql
+++ b/
sql/sql.d/001-struct.sql
@@
-2,17
+2,21
@@
-- DONE - CASCADE ON DELETE of orders related tables
-- DONE - STATUS on orders
-- DONE - CASCADE ON DELETE of orders related tables
-- DONE - STATUS on orders
-DROP TABLE #PFX#users;
+DROP TABLE
IF EXISTS
#PFX#users;
CREATE TABLE #PFX#users (
CREATE TABLE #PFX#users (
- code SERIAL PRIMARY KEY,
- login text UNIQUE,
- pass text,
- email text UNIQUE,
- 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;
+DROP TABLE
IF EXISTS
#PFX#groups;
CREATE TABLE #PFX#groups (
CREATE TABLE #PFX#groups (
- code SERIAL PRIMARY KEY,
- gname text
- );
+ code SERIAL PRIMARY KEY,
+ name text
+ );
+
+