1.1 --- a/setup/postgres/psql_create_tables.sql Sat Jul 22 15:07:23 2023 +0200 1.2 +++ b/setup/postgres/psql_create_tables.sql Sat Jul 22 22:32:04 2023 +0200 1.3 @@ -1,6 +1,3 @@ 1.4 --- This script creates the module management tables 1.5 --- 1.6 - 1.7 create table lpit_user 1.8 ( 1.9 userid serial primary key, 1.10 @@ -10,6 +7,8 @@ 1.11 givenname text 1.12 ); 1.13 1.14 +create type vcstype as enum ('None', 'Mercurial', 'Git'); 1.15 + 1.16 create table lpit_project 1.17 ( 1.18 projectid serial primary key, 1.19 @@ -18,6 +17,7 @@ 1.20 ordinal integer not null default 0, 1.21 description text, 1.22 repoUrl text, 1.23 + vcs vcstype not null default 'None'::vcstype, 1.24 owner integer references lpit_user (userid) 1.25 ); 1.26 1.27 @@ -168,3 +168,12 @@ 1.28 ); 1.29 1.30 create unique index lpit_issue_relation_unique on lpit_issue_relation (from_issue, to_issue, type); 1.31 + 1.32 +create table lpit_commit_ref 1.33 +( 1.34 + issueid integer not null references lpit_issue (issueid) on delete cascade, 1.35 + commit_hash text not null, 1.36 + commit_brief text not null 1.37 +); 1.38 + 1.39 +create unique index lpit_commit_ref_unique on lpit_commit_ref (issueid, commit_hash);