launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #32379
[Merge] ~enriqueesanchz/launchpad:add-bugpresence-sourcepackageseries-table into launchpad:db-devel
Enrique Sánchez has proposed merging ~enriqueesanchz/launchpad:add-bugpresence-sourcepackageseries-table into launchpad:db-devel.
Commit message:
Add bugpresence and sourcepackageseries table
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~enriqueesanchz/launchpad/+git/launchpad/+merge/484471
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~enriqueesanchz/launchpad:add-bugpresence-sourcepackageseries-table into launchpad:db-devel.
diff --git a/database/schema/patch-2211-34-1.sql b/database/schema/patch-2211-34-1.sql
new file mode 100644
index 0000000..1bf58ca
--- /dev/null
+++ b/database/schema/patch-2211-34-1.sql
@@ -0,0 +1,52 @@
+-- Copyright 2025 Canonical Ltd. This software is licensed under the
+-- GNU Affero General Public License version 3 (see the file LICENSE).
+
+SET client_min_messages=ERROR;
+
+CREATE TABLE bugpresence (
+ id serial PRIMARY KEY,
+ bug integer NOT NULL REFERENCES bug,
+ project integer REFERENCES project,
+ distribution integer REFERENCES distribution,
+ source_package_name integer REFERENCES sourcepackagename,
+ git_repository integer REFERENCES gitrepository,
+ break_fix_data JSONB
+);
+
+COMMENT ON TABLE bugpresence IS 'A link between bug, its presence in a project,
+ distribution, sourcepackagename or gitrepository, and break_fix_data';
+COMMENT ON COLUMN bugpresence.bug IS 'The bug id this bugpresence is related
+ to';
+COMMENT ON COLUMN bugpresence.project IS 'The project id this bugpresence is
+ related to';
+COMMENT ON COLUMN bugpresence.distribution IS 'The distribution id this
+ bugpresence is related to';
+COMMENT ON COLUMN bugpresence.source_package_name IS 'The sourcepackagename
+ id this bugpresence is related to';
+COMMENT ON COLUMN bugpresence.git_repository IS 'The gitrepository this
+ bugpresence is related to';
+COMMENT ON COLUMN bugpresence.break_fix_data IS 'Commits that breaks of fix
+ the bugpresence';
+
+CREATE TABLE sourcepackageseries (
+ id serial PRIMARY KEY,
+ distroseries integer NOT NULL REFERENCES distroseries,
+ source_package_name integer NOT NULL REFERENCES sourcepackagename,
+ name TEXT NOT NULL,
+ status integer NOT NULL,
+ repositories JSONB
+);
+
+COMMENT ON TABLE sourcepackageseries IS 'The series of a sourcepackage';
+COMMENT ON COLUMN sourcepackageseries.distroseries IS 'The distroseries of
+ this sourcepackageseries';
+COMMENT ON COLUMN sourcepackageseries.source_package_name IS 'The
+ sourcepackagename of this sourcepackageseries';
+COMMENT ON COLUMN sourcepackageseries.name IS 'The name of this
+ sourcepackageseries';
+COMMENT ON COLUMN sourcepackageseries.status IS 'The status of this
+ sourcepackageseries';
+COMMENT ON COLUMN sourcepackageseries.repositories IS 'Contains an array of
+ related repositories';
+
+INSERT INTO LaunchpadDatabaseRevision VALUES (2211, 34, 1);