setup/postgres/psql_create_tables.sql

Thu, 30 Jan 2025 21:20:27 +0100

author
Mike Becker <universe@uap-core.de>
date
Thu, 30 Jan 2025 21:20:27 +0100
changeset 347
d1edd8d9c8a1
parent 345
7a515768c481
permissions
-rw-r--r--

prepare implementation of "variants"

introduces the class, implements basic DAO stuff, and
adds the new path parameter

relates to #491

206
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
1 create table lpit_user
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
2 (
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
3 userid serial primary key,
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
4 username text not null unique,
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
5 mail text,
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
6 lastname text,
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
7 givenname text
20
bd1a76c91d5b module synchronization with database
Mike Becker <universe@uap-core.de>
parents: 16
diff changeset
8 );
37
fecda0f466e6 adds data model for projects and versions
Mike Becker <universe@uap-core.de>
parents: 36
diff changeset
9
284
671c1c8fbf1c add full support for commit references - fixes #276
Mike Becker <universe@uap-core.de>
parents: 268
diff changeset
10 create type vcstype as enum ('None', 'Mercurial', 'Git');
671c1c8fbf1c add full support for commit references - fixes #276
Mike Becker <universe@uap-core.de>
parents: 268
diff changeset
11
206
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
12 create table lpit_project
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
13 (
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
14 projectid serial primary key,
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
15 name text not null unique,
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
16 node text not null unique,
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
17 ordinal integer not null default 0,
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
18 description text,
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
19 repoUrl text,
284
671c1c8fbf1c add full support for commit references - fixes #276
Mike Becker <universe@uap-core.de>
parents: 268
diff changeset
20 vcs vcstype not null default 'None'::vcstype,
206
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
21 owner integer references lpit_user (userid)
37
fecda0f466e6 adds data model for projects and versions
Mike Becker <universe@uap-core.de>
parents: 36
diff changeset
22 );
fecda0f466e6 adds data model for projects and versions
Mike Becker <universe@uap-core.de>
parents: 36
diff changeset
23
fecda0f466e6 adds data model for projects and versions
Mike Becker <universe@uap-core.de>
parents: 36
diff changeset
24 create type version_status as enum (
fecda0f466e6 adds data model for projects and versions
Mike Becker <universe@uap-core.de>
parents: 36
diff changeset
25 'Future',
fecda0f466e6 adds data model for projects and versions
Mike Becker <universe@uap-core.de>
parents: 36
diff changeset
26 'Unreleased',
fecda0f466e6 adds data model for projects and versions
Mike Becker <universe@uap-core.de>
parents: 36
diff changeset
27 'Released',
fecda0f466e6 adds data model for projects and versions
Mike Becker <universe@uap-core.de>
parents: 36
diff changeset
28 'LTS',
fecda0f466e6 adds data model for projects and versions
Mike Becker <universe@uap-core.de>
parents: 36
diff changeset
29 'Deprecated'
206
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
30 );
37
fecda0f466e6 adds data model for projects and versions
Mike Becker <universe@uap-core.de>
parents: 36
diff changeset
31
206
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
32 create table lpit_version
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
33 (
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
34 versionid serial primary key,
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
35 project integer not null references lpit_project (projectid),
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
36 name text not null,
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
37 node text not null,
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
38 ordinal integer not null default 0,
225
87328572e36f #159 adds release and eol dates
Mike Becker <universe@uap-core.de>
parents: 206
diff changeset
39 status version_status not null default 'Future',
87328572e36f #159 adds release and eol dates
Mike Becker <universe@uap-core.de>
parents: 206
diff changeset
40 release date,
87328572e36f #159 adds release and eol dates
Mike Becker <universe@uap-core.de>
parents: 206
diff changeset
41 eol date
37
fecda0f466e6 adds data model for projects and versions
Mike Becker <universe@uap-core.de>
parents: 36
diff changeset
42 );
62
833e0385572a adds data model for issues
Mike Becker <universe@uap-core.de>
parents: 37
diff changeset
43
206
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
44 create unique index lpit_version_node_unique on lpit_version (project, node);
127
6105ee2cceaf adds component entity
Mike Becker <universe@uap-core.de>
parents: 124
diff changeset
45
206
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
46 create table lpit_component
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
47 (
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
48 id serial primary key,
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
49 project integer not null references lpit_project (projectid),
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
50 name text not null,
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
51 node text not null,
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
52 color char(6) not null default '000000',
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
53 ordinal integer not null default 0,
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
54 description text,
227
f0ede8046b59 #162 adds active flag to component
Mike Becker <universe@uap-core.de>
parents: 225
diff changeset
55 lead integer references lpit_user (userid),
f0ede8046b59 #162 adds active flag to component
Mike Becker <universe@uap-core.de>
parents: 225
diff changeset
56 active boolean not null default true
127
6105ee2cceaf adds component entity
Mike Becker <universe@uap-core.de>
parents: 124
diff changeset
57 );
6105ee2cceaf adds component entity
Mike Becker <universe@uap-core.de>
parents: 124
diff changeset
58
206
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
59 create unique index lpit_component_node_unique on lpit_component (project, node);
138
e2aa673dd473 adds custom node names - fixes #27
Mike Becker <universe@uap-core.de>
parents: 128
diff changeset
60
347
d1edd8d9c8a1 prepare implementation of "variants"
Mike Becker <universe@uap-core.de>
parents: 345
diff changeset
61 create table lpit_variant
d1edd8d9c8a1 prepare implementation of "variants"
Mike Becker <universe@uap-core.de>
parents: 345
diff changeset
62 (
d1edd8d9c8a1 prepare implementation of "variants"
Mike Becker <universe@uap-core.de>
parents: 345
diff changeset
63 id serial primary key,
d1edd8d9c8a1 prepare implementation of "variants"
Mike Becker <universe@uap-core.de>
parents: 345
diff changeset
64 project integer not null references lpit_project (projectid),
d1edd8d9c8a1 prepare implementation of "variants"
Mike Becker <universe@uap-core.de>
parents: 345
diff changeset
65 name text not null,
d1edd8d9c8a1 prepare implementation of "variants"
Mike Becker <universe@uap-core.de>
parents: 345
diff changeset
66 node text not null,
d1edd8d9c8a1 prepare implementation of "variants"
Mike Becker <universe@uap-core.de>
parents: 345
diff changeset
67 color char(6) not null default '000000',
d1edd8d9c8a1 prepare implementation of "variants"
Mike Becker <universe@uap-core.de>
parents: 345
diff changeset
68 ordinal integer not null default 0,
d1edd8d9c8a1 prepare implementation of "variants"
Mike Becker <universe@uap-core.de>
parents: 345
diff changeset
69 description text,
d1edd8d9c8a1 prepare implementation of "variants"
Mike Becker <universe@uap-core.de>
parents: 345
diff changeset
70 active boolean not null default true
d1edd8d9c8a1 prepare implementation of "variants"
Mike Becker <universe@uap-core.de>
parents: 345
diff changeset
71 );
d1edd8d9c8a1 prepare implementation of "variants"
Mike Becker <universe@uap-core.de>
parents: 345
diff changeset
72
d1edd8d9c8a1 prepare implementation of "variants"
Mike Becker <universe@uap-core.de>
parents: 345
diff changeset
73 create unique index lpit_variant_node_unique on lpit_variant (project, node);
d1edd8d9c8a1 prepare implementation of "variants"
Mike Becker <universe@uap-core.de>
parents: 345
diff changeset
74
62
833e0385572a adds data model for issues
Mike Becker <universe@uap-core.de>
parents: 37
diff changeset
75 create type issue_status as enum (
833e0385572a adds data model for issues
Mike Becker <universe@uap-core.de>
parents: 37
diff changeset
76 'InSpecification',
833e0385572a adds data model for issues
Mike Becker <universe@uap-core.de>
parents: 37
diff changeset
77 'ToDo',
833e0385572a adds data model for issues
Mike Becker <universe@uap-core.de>
parents: 37
diff changeset
78 'Scheduled',
833e0385572a adds data model for issues
Mike Becker <universe@uap-core.de>
parents: 37
diff changeset
79 'InProgress',
833e0385572a adds data model for issues
Mike Becker <universe@uap-core.de>
parents: 37
diff changeset
80 'InReview',
252
90f5e12c7623 add issue status 'Ready'
Mike Becker <universe@uap-core.de>
parents: 242
diff changeset
81 'Ready',
62
833e0385572a adds data model for issues
Mike Becker <universe@uap-core.de>
parents: 37
diff changeset
82 'Done',
833e0385572a adds data model for issues
Mike Becker <universe@uap-core.de>
parents: 37
diff changeset
83 'Rejected',
81
1a2e7b5d48f7 adds issue summaries
Mike Becker <universe@uap-core.de>
parents: 75
diff changeset
84 'Withdrawn',
1a2e7b5d48f7 adds issue summaries
Mike Becker <universe@uap-core.de>
parents: 75
diff changeset
85 'Duplicate'
206
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
86 );
62
833e0385572a adds data model for issues
Mike Becker <universe@uap-core.de>
parents: 37
diff changeset
87
833e0385572a adds data model for issues
Mike Becker <universe@uap-core.de>
parents: 37
diff changeset
88 create type issue_category as enum (
833e0385572a adds data model for issues
Mike Becker <universe@uap-core.de>
parents: 37
diff changeset
89 'Feature',
833e0385572a adds data model for issues
Mike Becker <universe@uap-core.de>
parents: 37
diff changeset
90 'Improvement',
833e0385572a adds data model for issues
Mike Becker <universe@uap-core.de>
parents: 37
diff changeset
91 'Bug',
833e0385572a adds data model for issues
Mike Becker <universe@uap-core.de>
parents: 37
diff changeset
92 'Task',
833e0385572a adds data model for issues
Mike Becker <universe@uap-core.de>
parents: 37
diff changeset
93 'Test'
206
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
94 );
62
833e0385572a adds data model for issues
Mike Becker <universe@uap-core.de>
parents: 37
diff changeset
95
206
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
96 create table lpit_issue_phases
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
97 (
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
98 status issue_status primary key,
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
99 phase integer not null
81
1a2e7b5d48f7 adds issue summaries
Mike Becker <universe@uap-core.de>
parents: 75
diff changeset
100 );
1a2e7b5d48f7 adds issue summaries
Mike Becker <universe@uap-core.de>
parents: 75
diff changeset
101
206
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
102 create table lpit_issue
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
103 (
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
104 issueid serial primary key,
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
105 project integer not null references lpit_project (projectid),
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
106 component integer references lpit_component (id),
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
107 status issue_status not null default 'InSpecification',
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
108 category issue_category not null default 'Feature',
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
109 subject text not null,
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
110 description text,
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
111 assignee integer references lpit_user (userid),
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
112 created timestamp with time zone not null default now(),
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
113 updated timestamp with time zone not null default now(),
231
dcb1d5a7ea3a #163 removes multi selection for versions
Mike Becker <universe@uap-core.de>
parents: 227
diff changeset
114 eta date,
dcb1d5a7ea3a #163 removes multi selection for versions
Mike Becker <universe@uap-core.de>
parents: 227
diff changeset
115 affected integer references lpit_version (versionid),
dcb1d5a7ea3a #163 removes multi selection for versions
Mike Becker <universe@uap-core.de>
parents: 227
diff changeset
116 resolved integer references lpit_version (versionid)
75
33b6843fdf8a adds the ability to create and edit issues
Mike Becker <universe@uap-core.de>
parents: 62
diff changeset
117 );
33b6843fdf8a adds the ability to create and edit issues
Mike Becker <universe@uap-core.de>
parents: 62
diff changeset
118
232
296e12ff8d1c #109 adds Stasi that collects intel for the feed
Mike Becker <universe@uap-core.de>
parents: 231
diff changeset
119 create type issue_history_event as enum (
296e12ff8d1c #109 adds Stasi that collects intel for the feed
Mike Becker <universe@uap-core.de>
parents: 231
diff changeset
120 'New',
296e12ff8d1c #109 adds Stasi that collects intel for the feed
Mike Becker <universe@uap-core.de>
parents: 231
diff changeset
121 'Update',
296e12ff8d1c #109 adds Stasi that collects intel for the feed
Mike Becker <universe@uap-core.de>
parents: 231
diff changeset
122 'NewComment',
296e12ff8d1c #109 adds Stasi that collects intel for the feed
Mike Becker <universe@uap-core.de>
parents: 231
diff changeset
123 'UpdateComment'
296e12ff8d1c #109 adds Stasi that collects intel for the feed
Mike Becker <universe@uap-core.de>
parents: 231
diff changeset
124 );
296e12ff8d1c #109 adds Stasi that collects intel for the feed
Mike Becker <universe@uap-core.de>
parents: 231
diff changeset
125
296e12ff8d1c #109 adds Stasi that collects intel for the feed
Mike Becker <universe@uap-core.de>
parents: 231
diff changeset
126 create table lpit_issue_history_event
296e12ff8d1c #109 adds Stasi that collects intel for the feed
Mike Becker <universe@uap-core.de>
parents: 231
diff changeset
127 (
296e12ff8d1c #109 adds Stasi that collects intel for the feed
Mike Becker <universe@uap-core.de>
parents: 231
diff changeset
128 eventid serial primary key,
296e12ff8d1c #109 adds Stasi that collects intel for the feed
Mike Becker <universe@uap-core.de>
parents: 231
diff changeset
129 issueid integer not null references lpit_issue (issueid) on delete cascade,
345
7a515768c481 add author to issue history and RSS feed - fixes #463
Mike Becker <universe@uap-core.de>
parents: 284
diff changeset
130 userid integer null references lpit_user (userid) on delete set null,
242
b7f3e972b13c #109 add comment history
Mike Becker <universe@uap-core.de>
parents: 241
diff changeset
131 subject text not null,
232
296e12ff8d1c #109 adds Stasi that collects intel for the feed
Mike Becker <universe@uap-core.de>
parents: 231
diff changeset
132 time timestamp with time zone not null default now(),
296e12ff8d1c #109 adds Stasi that collects intel for the feed
Mike Becker <universe@uap-core.de>
parents: 231
diff changeset
133 type issue_history_event not null
296e12ff8d1c #109 adds Stasi that collects intel for the feed
Mike Becker <universe@uap-core.de>
parents: 231
diff changeset
134 );
296e12ff8d1c #109 adds Stasi that collects intel for the feed
Mike Becker <universe@uap-core.de>
parents: 231
diff changeset
135
296e12ff8d1c #109 adds Stasi that collects intel for the feed
Mike Becker <universe@uap-core.de>
parents: 231
diff changeset
136 create table lpit_issue_history_data
296e12ff8d1c #109 adds Stasi that collects intel for the feed
Mike Becker <universe@uap-core.de>
parents: 231
diff changeset
137 (
239
9365c7fb0240 #109 add assignee filter to rss feed
Mike Becker <universe@uap-core.de>
parents: 232
diff changeset
138 eventid integer not null references lpit_issue_history_event (eventid) on delete cascade,
9365c7fb0240 #109 add assignee filter to rss feed
Mike Becker <universe@uap-core.de>
parents: 232
diff changeset
139 component text,
9365c7fb0240 #109 add assignee filter to rss feed
Mike Becker <universe@uap-core.de>
parents: 232
diff changeset
140 status issue_status not null,
9365c7fb0240 #109 add assignee filter to rss feed
Mike Becker <universe@uap-core.de>
parents: 232
diff changeset
141 category issue_category not null,
9365c7fb0240 #109 add assignee filter to rss feed
Mike Becker <universe@uap-core.de>
parents: 232
diff changeset
142 description text,
9365c7fb0240 #109 add assignee filter to rss feed
Mike Becker <universe@uap-core.de>
parents: 232
diff changeset
143 assignee text,
9365c7fb0240 #109 add assignee filter to rss feed
Mike Becker <universe@uap-core.de>
parents: 232
diff changeset
144 eta date,
9365c7fb0240 #109 add assignee filter to rss feed
Mike Becker <universe@uap-core.de>
parents: 232
diff changeset
145 affected text,
9365c7fb0240 #109 add assignee filter to rss feed
Mike Becker <universe@uap-core.de>
parents: 232
diff changeset
146 resolved text
232
296e12ff8d1c #109 adds Stasi that collects intel for the feed
Mike Becker <universe@uap-core.de>
parents: 231
diff changeset
147 );
296e12ff8d1c #109 adds Stasi that collects intel for the feed
Mike Becker <universe@uap-core.de>
parents: 231
diff changeset
148
206
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
149 create table lpit_issue_comment
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
150 (
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
151 commentid serial primary key,
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
152 issueid integer not null references lpit_issue (issueid),
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
153 userid integer references lpit_user (userid),
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
154 created timestamp with time zone not null default now(),
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
155 updated timestamp with time zone not null default now(),
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
156 updatecount integer not null default 0,
fe4de34822a5 #133 changes all varchar columns to text
Mike Becker <universe@uap-core.de>
parents: 187
diff changeset
157 comment text not null
124
ed2e7aef2a3e adds issue comments
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
158 );
232
296e12ff8d1c #109 adds Stasi that collects intel for the feed
Mike Becker <universe@uap-core.de>
parents: 231
diff changeset
159
296e12ff8d1c #109 adds Stasi that collects intel for the feed
Mike Becker <universe@uap-core.de>
parents: 231
diff changeset
160 create table lpit_issue_comment_history
296e12ff8d1c #109 adds Stasi that collects intel for the feed
Mike Becker <universe@uap-core.de>
parents: 231
diff changeset
161 (
296e12ff8d1c #109 adds Stasi that collects intel for the feed
Mike Becker <universe@uap-core.de>
parents: 231
diff changeset
162 commentid integer not null references lpit_issue_comment (commentid) on delete cascade,
296e12ff8d1c #109 adds Stasi that collects intel for the feed
Mike Becker <universe@uap-core.de>
parents: 231
diff changeset
163 eventid integer not null references lpit_issue_history_event (eventid) on delete cascade,
296e12ff8d1c #109 adds Stasi that collects intel for the feed
Mike Becker <universe@uap-core.de>
parents: 231
diff changeset
164 comment text not null
296e12ff8d1c #109 adds Stasi that collects intel for the feed
Mike Becker <universe@uap-core.de>
parents: 231
diff changeset
165 );
296e12ff8d1c #109 adds Stasi that collects intel for the feed
Mike Becker <universe@uap-core.de>
parents: 231
diff changeset
166
263
aa22103809cd #29 add possibility to relate issues
Mike Becker <universe@uap-core.de>
parents: 252
diff changeset
167 create type relation_type as enum (
aa22103809cd #29 add possibility to relate issues
Mike Becker <universe@uap-core.de>
parents: 252
diff changeset
168 'RelatesTo',
aa22103809cd #29 add possibility to relate issues
Mike Becker <universe@uap-core.de>
parents: 252
diff changeset
169 'TogetherWith',
aa22103809cd #29 add possibility to relate issues
Mike Becker <universe@uap-core.de>
parents: 252
diff changeset
170 'Before',
aa22103809cd #29 add possibility to relate issues
Mike Becker <universe@uap-core.de>
parents: 252
diff changeset
171 'SubtaskOf',
268
ca5501d851fa #15 add issue filters
Mike Becker <universe@uap-core.de>
parents: 263
diff changeset
172 'DefectOf',
263
aa22103809cd #29 add possibility to relate issues
Mike Becker <universe@uap-core.de>
parents: 252
diff changeset
173 'Blocks',
aa22103809cd #29 add possibility to relate issues
Mike Becker <universe@uap-core.de>
parents: 252
diff changeset
174 'Tests',
aa22103809cd #29 add possibility to relate issues
Mike Becker <universe@uap-core.de>
parents: 252
diff changeset
175 'Duplicates'
aa22103809cd #29 add possibility to relate issues
Mike Becker <universe@uap-core.de>
parents: 252
diff changeset
176 );
aa22103809cd #29 add possibility to relate issues
Mike Becker <universe@uap-core.de>
parents: 252
diff changeset
177
aa22103809cd #29 add possibility to relate issues
Mike Becker <universe@uap-core.de>
parents: 252
diff changeset
178 create table lpit_issue_relation
aa22103809cd #29 add possibility to relate issues
Mike Becker <universe@uap-core.de>
parents: 252
diff changeset
179 (
aa22103809cd #29 add possibility to relate issues
Mike Becker <universe@uap-core.de>
parents: 252
diff changeset
180 from_issue integer not null references lpit_issue (issueid) on delete cascade,
aa22103809cd #29 add possibility to relate issues
Mike Becker <universe@uap-core.de>
parents: 252
diff changeset
181 to_issue integer not null references lpit_issue (issueid) on delete cascade,
aa22103809cd #29 add possibility to relate issues
Mike Becker <universe@uap-core.de>
parents: 252
diff changeset
182 type relation_type not null
aa22103809cd #29 add possibility to relate issues
Mike Becker <universe@uap-core.de>
parents: 252
diff changeset
183 );
aa22103809cd #29 add possibility to relate issues
Mike Becker <universe@uap-core.de>
parents: 252
diff changeset
184
aa22103809cd #29 add possibility to relate issues
Mike Becker <universe@uap-core.de>
parents: 252
diff changeset
185 create unique index lpit_issue_relation_unique on lpit_issue_relation (from_issue, to_issue, type);
284
671c1c8fbf1c add full support for commit references - fixes #276
Mike Becker <universe@uap-core.de>
parents: 268
diff changeset
186
671c1c8fbf1c add full support for commit references - fixes #276
Mike Becker <universe@uap-core.de>
parents: 268
diff changeset
187 create table lpit_commit_ref
671c1c8fbf1c add full support for commit references - fixes #276
Mike Becker <universe@uap-core.de>
parents: 268
diff changeset
188 (
671c1c8fbf1c add full support for commit references - fixes #276
Mike Becker <universe@uap-core.de>
parents: 268
diff changeset
189 issueid integer not null references lpit_issue (issueid) on delete cascade,
671c1c8fbf1c add full support for commit references - fixes #276
Mike Becker <universe@uap-core.de>
parents: 268
diff changeset
190 commit_hash text not null,
671c1c8fbf1c add full support for commit references - fixes #276
Mike Becker <universe@uap-core.de>
parents: 268
diff changeset
191 commit_brief text not null
671c1c8fbf1c add full support for commit references - fixes #276
Mike Becker <universe@uap-core.de>
parents: 268
diff changeset
192 );
671c1c8fbf1c add full support for commit references - fixes #276
Mike Becker <universe@uap-core.de>
parents: 268
diff changeset
193
671c1c8fbf1c add full support for commit references - fixes #276
Mike Becker <universe@uap-core.de>
parents: 268
diff changeset
194 create unique index lpit_commit_ref_unique on lpit_commit_ref (issueid, commit_hash);

mercurial