setup/postgres/psql_create_tables.sql

changeset 138
e2aa673dd473
parent 128
947d0f6a6a83
child 175
1e6f2aace666
     1.1 --- a/setup/postgres/psql_create_tables.sql	Thu Oct 22 12:00:34 2020 +0200
     1.2 +++ b/setup/postgres/psql_create_tables.sql	Thu Oct 22 13:03:26 2020 +0200
     1.3 @@ -12,6 +12,7 @@
     1.4  create table lpit_project (
     1.5      projectid       serial          primary key,
     1.6      name            varchar(20)     not null unique,
     1.7 +    node            varchar(20)     not null unique,
     1.8      description     varchar(200),
     1.9      repoUrl         varchar(50),
    1.10      owner           integer         references lpit_user(userid)
    1.11 @@ -29,21 +30,26 @@
    1.12      versionid       serial          primary key,
    1.13      project         integer         not null references lpit_project(projectid),
    1.14      name            varchar(20)     not null,
    1.15 +    node            varchar(20)     not null,
    1.16      ordinal         integer         not null default 0,
    1.17      status          version_status  not null default 'Future'
    1.18  );
    1.19  
    1.20 +create unique index lpit_version_node_unique on lpit_version(project, node);
    1.21  
    1.22  create table lpit_component (
    1.23      id              serial          primary key,
    1.24      project         integer         not null references lpit_project(projectid),
    1.25      name            varchar(20)     not null,
    1.26 +    node            varchar(20)     not null,
    1.27      color           char(6)         not null default '000000',
    1.28      ordinal         integer         not null default 0,
    1.29      description     text,
    1.30      lead            integer         references lpit_user(userid)
    1.31  );
    1.32  
    1.33 +create unique index lpit_component_node_unique on lpit_component(project, node);
    1.34 +
    1.35  create type issue_status as enum (
    1.36      'InSpecification',
    1.37      'ToDo',

mercurial