UNIQUE constraint added to login and email fields
[brisk.git] / sql / sql.d / 001-struct.sql
1 -- TODO
2 --   DONE - CASCADE ON DELETE of orders related tables
3 --   DONE - STATUS on orders
4
5 DROP TABLE #PFX#users;
6 CREATE TABLE #PFX#users (
7                         code  SERIAL PRIMARY KEY,
8                         login text UNIQUE,
9                         pass  text,
10                         email text UNIQUE,
11                         type  integer
12                         );
13
14 DROP TABLE #PFX#groups;
15 CREATE TABLE #PFX#groups (
16                         code  SERIAL PRIMARY KEY,
17                         gname text
18                         );