setup/postgres/psql_create_tables.sql

changeset 20
bd1a76c91d5b
parent 16
4e0998805276
child 31
58f78f0142e8
equal deleted inserted replaced
19:1a0ac419f714 20:bd1a76c91d5b
1 -- This script creates the module management tables
2 --
3
4 create table lpitcore_module (
5 modid serial primary key,
6 classname varchar(100) not null unique,
7 visible boolean not null default(true)
8 );
9
10 create table lpitcore_user (
11 userid serial primary key,
12 username varchar(50) not null unique,
13 lastname varchar(50),
14 givenname varchar(50)
15 );
16
17 create table lpitcore_authorization (
18 modid integer not null references lpitcore_modules(modid) on delete cascade,
19 userid integer not null references lpitcore_user(userid) on delete cascade,
20 power integer not null check(power >= 0)
21 );
22
23 create table lpitcore_menu (
24 modid integer not null references lpitcore_modules(modid) on delete cascade,
25 userid integer not null references lpitcore_user(userid) on delete cascade,
26 seq integer not null
27 );

mercurial