X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=sql%2Fsql.d%2F001-struct.sql;h=fa1dc8689a688b219980bf8d61796ac95cc0266c;hb=484a365c1e66ba4b878117275423a1594c209960;hp=3639258c21c3d1102a940c5ec85188efa83e8da6;hpb=9fba6a242795ed609150c23ab6ea886a3b78e718;p=brisk.git diff --git a/sql/sql.d/001-struct.sql b/sql/sql.d/001-struct.sql index 3639258..fa1dc86 100644 --- a/sql/sql.d/001-struct.sql +++ b/sql/sql.d/001-struct.sql @@ -2,18 +2,18 @@ -- 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 ( 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 + 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 ( code SERIAL PRIMARY KEY, name text