
diff -r 1a0ac419f714 -r bd1a76c91d5b setup/postgres/psql_create_tables.sql
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/setup/postgres/psql_create_tables.sql	Sat Mar 31 19:35:04 2018 +0200
@@ -0,0 +1,27 @@
+-- This script creates the module management tables
+--
+
+create table lpitcore_module (
+    modid       serial          primary key,
+    classname   varchar(100)    not null unique,
+    visible     boolean         not null default(true)
+);
+
+create table lpitcore_user (
+    userid          serial          primary key,
+    username        varchar(50)     not null unique,
+    lastname        varchar(50),
+    givenname       varchar(50)
+);
+
+create table lpitcore_authorization (
+    modid           integer         not null references lpitcore_modules(modid) on delete cascade,
+    userid          integer         not null references lpitcore_user(userid) on delete cascade,
+    power           integer         not null check(power >= 0)
+);
+
+create table lpitcore_menu (
+    modid           integer         not null references lpitcore_modules(modid) on delete cascade,
+    userid          integer         not null references lpitcore_user(userid) on delete cascade,
+    seq             integer         not null
+);




