10 ); |
10 ); |
11 |
11 |
12 create table lpit_project ( |
12 create table lpit_project ( |
13 projectid serial primary key, |
13 projectid serial primary key, |
14 name varchar(20) not null unique, |
14 name varchar(20) not null unique, |
|
15 node varchar(20) not null unique, |
15 description varchar(200), |
16 description varchar(200), |
16 repoUrl varchar(50), |
17 repoUrl varchar(50), |
17 owner integer references lpit_user(userid) |
18 owner integer references lpit_user(userid) |
18 ); |
19 ); |
19 |
20 |
27 |
28 |
28 create table lpit_version ( |
29 create table lpit_version ( |
29 versionid serial primary key, |
30 versionid serial primary key, |
30 project integer not null references lpit_project(projectid), |
31 project integer not null references lpit_project(projectid), |
31 name varchar(20) not null, |
32 name varchar(20) not null, |
|
33 node varchar(20) not null, |
32 ordinal integer not null default 0, |
34 ordinal integer not null default 0, |
33 status version_status not null default 'Future' |
35 status version_status not null default 'Future' |
34 ); |
36 ); |
35 |
37 |
|
38 create unique index lpit_version_node_unique on lpit_version(project, node); |
36 |
39 |
37 create table lpit_component ( |
40 create table lpit_component ( |
38 id serial primary key, |
41 id serial primary key, |
39 project integer not null references lpit_project(projectid), |
42 project integer not null references lpit_project(projectid), |
40 name varchar(20) not null, |
43 name varchar(20) not null, |
|
44 node varchar(20) not null, |
41 color char(6) not null default '000000', |
45 color char(6) not null default '000000', |
42 ordinal integer not null default 0, |
46 ordinal integer not null default 0, |
43 description text, |
47 description text, |
44 lead integer references lpit_user(userid) |
48 lead integer references lpit_user(userid) |
45 ); |
49 ); |
|
50 |
|
51 create unique index lpit_component_node_unique on lpit_component(project, node); |
46 |
52 |
47 create type issue_status as enum ( |
53 create type issue_status as enum ( |
48 'InSpecification', |
54 'InSpecification', |
49 'ToDo', |
55 'ToDo', |
50 'Scheduled', |
56 'Scheduled', |