Sat, 09 May 2020 14:58:20 +0200
adds module priorities
20
bd1a76c91d5b
module synchronization with database
Mike Becker <universe@uap-core.de>
parents:
16
diff
changeset
|
1 | -- This script creates the module management tables |
bd1a76c91d5b
module synchronization with database
Mike Becker <universe@uap-core.de>
parents:
16
diff
changeset
|
2 | -- |
2
fcb452578142
adds create database setup script
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
3 | |
20
bd1a76c91d5b
module synchronization with database
Mike Becker <universe@uap-core.de>
parents:
16
diff
changeset
|
4 | create table lpitcore_module ( |
bd1a76c91d5b
module synchronization with database
Mike Becker <universe@uap-core.de>
parents:
16
diff
changeset
|
5 | modid serial primary key, |
bd1a76c91d5b
module synchronization with database
Mike Becker <universe@uap-core.de>
parents:
16
diff
changeset
|
6 | classname varchar(100) not null unique, |
31 | 7 | visible boolean not null default(true), |
8 | priority integer not null default(1000) | |
20
bd1a76c91d5b
module synchronization with database
Mike Becker <universe@uap-core.de>
parents:
16
diff
changeset
|
9 | ); |
2
fcb452578142
adds create database setup script
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
10 | |
20
bd1a76c91d5b
module synchronization with database
Mike Becker <universe@uap-core.de>
parents:
16
diff
changeset
|
11 | create table lpitcore_user ( |
bd1a76c91d5b
module synchronization with database
Mike Becker <universe@uap-core.de>
parents:
16
diff
changeset
|
12 | userid serial primary key, |
bd1a76c91d5b
module synchronization with database
Mike Becker <universe@uap-core.de>
parents:
16
diff
changeset
|
13 | username varchar(50) not null unique, |
bd1a76c91d5b
module synchronization with database
Mike Becker <universe@uap-core.de>
parents:
16
diff
changeset
|
14 | lastname varchar(50), |
bd1a76c91d5b
module synchronization with database
Mike Becker <universe@uap-core.de>
parents:
16
diff
changeset
|
15 | givenname varchar(50) |
bd1a76c91d5b
module synchronization with database
Mike Becker <universe@uap-core.de>
parents:
16
diff
changeset
|
16 | ); |
5
131903fc16b8
moves psql DB setup script to another file (we want to support other engines later) + adds some missing statements to that file
Mike Becker <universe@uap-core.de>
parents:
2
diff
changeset
|
17 | |
20
bd1a76c91d5b
module synchronization with database
Mike Becker <universe@uap-core.de>
parents:
16
diff
changeset
|
18 | create table lpitcore_authorization ( |
bd1a76c91d5b
module synchronization with database
Mike Becker <universe@uap-core.de>
parents:
16
diff
changeset
|
19 | modid integer not null references lpitcore_modules(modid) on delete cascade, |
bd1a76c91d5b
module synchronization with database
Mike Becker <universe@uap-core.de>
parents:
16
diff
changeset
|
20 | userid integer not null references lpitcore_user(userid) on delete cascade, |
bd1a76c91d5b
module synchronization with database
Mike Becker <universe@uap-core.de>
parents:
16
diff
changeset
|
21 | power integer not null check(power >= 0) |
bd1a76c91d5b
module synchronization with database
Mike Becker <universe@uap-core.de>
parents:
16
diff
changeset
|
22 | ); |
bd1a76c91d5b
module synchronization with database
Mike Becker <universe@uap-core.de>
parents:
16
diff
changeset
|
23 | |
bd1a76c91d5b
module synchronization with database
Mike Becker <universe@uap-core.de>
parents:
16
diff
changeset
|
24 | create table lpitcore_menu ( |
bd1a76c91d5b
module synchronization with database
Mike Becker <universe@uap-core.de>
parents:
16
diff
changeset
|
25 | modid integer not null references lpitcore_modules(modid) on delete cascade, |
bd1a76c91d5b
module synchronization with database
Mike Becker <universe@uap-core.de>
parents:
16
diff
changeset
|
26 | userid integer not null references lpitcore_user(userid) on delete cascade, |
bd1a76c91d5b
module synchronization with database
Mike Becker <universe@uap-core.de>
parents:
16
diff
changeset
|
27 | seq integer not null |
bd1a76c91d5b
module synchronization with database
Mike Becker <universe@uap-core.de>
parents:
16
diff
changeset
|
28 | ); |