7675.794.1
by Michael Nelson
Initial database schema for DistroSeriesDifference. |
1 |
SET client_min_messages=ERROR; |
2 |
||
3 |
CREATE TABLE DistroSeriesDifference ( |
|
4 |
id serial PRIMARY KEY, |
|
7675.794.4
by Michael Nelson
derived_series is required. |
5 |
derived_series integer NOT NULL CONSTRAINT distroseriesdifference__derived_series__fk REFERENCES distroseries, |
7675.794.7
by Michael Nelson
Replace spph's with source package name. |
6 |
source_package_name integer NOT NULL CONSTRAINT distroseriesdifference__source_package_name__fk REFERENCES sourcepackagename, |
7675.794.13
by Michael Nelson
Renamed last_package_diff->package_diff and updated unique constraint on messages join table. |
7 |
package_diff integer CONSTRAINT distroseriesdifference__package_diff__fk REFERENCES packagediff, |
7675.794.8
by Michael Nelson
Added package_diff FK and difference_type columns. |
8 |
status integer NOT NULL, |
9 |
difference_type integer NOT NULL |
|
7675.794.1
by Michael Nelson
Initial database schema for DistroSeriesDifference. |
10 |
);
|
11 |
CREATE INDEX distroseriesdifference__derived_series__idx ON distroseriesdifference(derived_series); |
|
7675.794.7
by Michael Nelson
Replace spph's with source package name. |
12 |
CREATE INDEX distroseriesdifference__source_package_name__idx ON distroseriesdifference(source_package_name); |
7675.794.2
by Michael Nelson
Fixed column rename. |
13 |
CREATE INDEX distroseriesdifference__status__idx ON distroseriesdifference(status); |
7675.794.8
by Michael Nelson
Added package_diff FK and difference_type columns. |
14 |
CREATE INDEX distroseriesdifference__difference_type__idx ON distroseriesdifference(difference_type); |
7675.794.13
by Michael Nelson
Renamed last_package_diff->package_diff and updated unique constraint on messages join table. |
15 |
CREATE INDEX distroseriesdifference__package_diff__idx ON distroseriesdifference(package_diff); |
7675.794.12
by Michael Nelson
Added index for last_package_diff, removed activity_log and added a joining table for messages. |
16 |
|
17 |
CREATE TABLE DistroSeriesDifferenceMessage( |
|
18 |
id serial PRIMARY KEY, |
|
19 |
distro_series_difference integer NOT NULL CONSTRAINT distroseriesdifferencemessage__distro_series_difference__fk REFERENCES distroseriesdifference, |
|
7675.794.13
by Michael Nelson
Renamed last_package_diff->package_diff and updated unique constraint on messages join table. |
20 |
message integer NOT NULL CONSTRAINT distroseriesdifferencemessage__message__fk REFERENCES message UNIQUE |
7675.794.12
by Michael Nelson
Added index for last_package_diff, removed activity_log and added a joining table for messages. |
21 |
);
|
22 |
CREATE INDEX distroseriesdifferencemessage__distroseriesdifference__idx ON distroseriesdifferencemessage(distro_series_difference); |
|
23 |
||
24 |
INSERT INTO LaunchpadDatabaseRevision VALUES (2208, 07, 0); |