setup/postgres/psql_create_tables.sql

changeset 37
fecda0f466e6
parent 36
0f4f8f255c32
child 62
833e0385572a
equal deleted inserted replaced
36:0f4f8f255c32 37:fecda0f466e6
1 -- This script creates the module management tables 1 -- This script creates the module management tables
2 -- 2 --
3 3
4 create table lpitcore_user ( 4 create table lpit_user (
5 userid serial primary key, 5 userid serial primary key,
6 username varchar(50) not null unique, 6 username varchar(50) not null unique,
7 mail varchar(50),
7 lastname varchar(50), 8 lastname varchar(50),
8 givenname varchar(50) 9 givenname varchar(50)
9 ); 10 );
11
12 create table lpit_project (
13 id serial primary key,
14 name varchar(20) not null unique,
15 description varchar(200),
16 repoUrl varchar(50),
17 owner integer references lpit_user(userid)
18 );
19
20 create type version_status as enum (
21 'Future',
22 'Unreleased',
23 'Released',
24 'LTS',
25 'Deprecated'
26 );
27
28 create table lpit_version (
29 id serial primary key,
30 project integer not null references lpit_project(id),
31 name varchar(20) not null,
32 ordinal integer not null default 0,
33 status version_status not null default 'Future'
34 );

mercurial