147 commentid integer not null references lpit_issue_comment (commentid) on delete cascade, |
147 commentid integer not null references lpit_issue_comment (commentid) on delete cascade, |
148 eventid integer not null references lpit_issue_history_event (eventid) on delete cascade, |
148 eventid integer not null references lpit_issue_history_event (eventid) on delete cascade, |
149 comment text not null |
149 comment text not null |
150 ); |
150 ); |
151 |
151 |
|
152 create type relation_type as enum ( |
|
153 'RelatesTo', |
|
154 'TogetherWith', |
|
155 'Before', |
|
156 'SubtaskOf', |
|
157 'Blocks', |
|
158 'Tests', |
|
159 'Duplicates' |
|
160 ); |
|
161 |
|
162 create table lpit_issue_relation |
|
163 ( |
|
164 from_issue integer not null references lpit_issue (issueid) on delete cascade, |
|
165 to_issue integer not null references lpit_issue (issueid) on delete cascade, |
|
166 type relation_type not null |
|
167 ); |
|
168 |
|
169 create unique index lpit_issue_relation_unique on lpit_issue_relation (from_issue, to_issue, type); |