setup/postgres/psql_create_tables.sql

changeset 127
6105ee2cceaf
parent 124
ed2e7aef2a3e
child 128
947d0f6a6a83
equal deleted inserted replaced
126:4148e6de0f21 127:6105ee2cceaf
31 name varchar(20) not null, 31 name varchar(20) not null,
32 ordinal integer not null default 0, 32 ordinal integer not null default 0,
33 status version_status not null default 'Future' 33 status version_status not null default 'Future'
34 ); 34 );
35 35
36
37 create table lpit_component (
38 id serial primary key,
39 project integer not null references lpit_project(projectid),
40 name varchar(20) not null,
41 color char(6) not null default '000000',
42 ordinal integer not null default 0,
43 description text
44 );
45
36 create type issue_status as enum ( 46 create type issue_status as enum (
37 'InSpecification', 47 'InSpecification',
38 'ToDo', 48 'ToDo',
39 'Scheduled', 49 'Scheduled',
40 'InProgress', 50 'InProgress',
59 ); 69 );
60 70
61 create table lpit_issue ( 71 create table lpit_issue (
62 issueid serial primary key, 72 issueid serial primary key,
63 project integer not null references lpit_project(projectid), 73 project integer not null references lpit_project(projectid),
74 component integer references lpit_component(id),
64 status issue_status not null default 'InSpecification', 75 status issue_status not null default 'InSpecification',
65 category issue_category not null default 'Feature', 76 category issue_category not null default 'Feature',
66 subject varchar(200) not null, 77 subject varchar(200) not null,
67 description text, 78 description text,
68 assignee integer references lpit_user(userid), 79 assignee integer references lpit_user(userid),

mercurial