launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #31730
[Merge] ~alvarocs/launchpad:add-lp-templates-db into launchpad:db-devel
Alvaro Crespo Serrano has proposed merging ~alvarocs/launchpad:add-lp-templates-db into launchpad:db-devel.
Commit message:
Add lp_templates to Distribution, Distributionsourcepackage, Product, Ociproject, Project.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~alvarocs/launchpad/+git/launchpad/+merge/475412
Create a new JSONB column called `lp_templates` into the following tables: `distribution, distributionsourcepackage, product, ociproject, project. This will store all templates used in Launchpad.
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~alvarocs/launchpad:add-lp-templates-db into launchpad:db-devel.
diff --git a/database/schema/patch-2211-30-0.sql b/database/schema/patch-2211-30-0.sql
new file mode 100644
index 0000000..e0738b8
--- /dev/null
+++ b/database/schema/patch-2211-30-0.sql
@@ -0,0 +1,19 @@
+-- Copyright 2024 Canonical Ltd. This software is licensed under the
+-- GNU Affero General Public License version 3 (see the file LICENSE).
+
+SET client_min_messages=ERROR;
+
+ALTER TABLE distribution ADD COLUMN lp_templates JSONB;
+ALTER TABLE distributionsourcepackage ADD COLUMN lp_templates JSONB;
+ALTER TABLE product ADD COLUMN lp_templates JSONB;
+ALTER TABLE ociproject ADD COLUMN lp_templates JSONB;
+ALTER TABLE project ADD COLUMN lp_templates JSONB;
+
+COMMENT ON COLUMN distribution.lp_templates IS 'A JSON data structure that contains different templates for Launchpad';
+COMMENT ON COLUMN distributionsourcepackage.lp_templates IS 'A JSON data structure that contains different templates for Launchpad';
+COMMENT ON COLUMN product.lp_templates IS 'A JSON data structure that contains different templates for Launchpad';
+COMMENT ON COLUMN ociproject.lp_templates IS 'A JSON data structure that contains different templates for Launchpad';
+COMMENT ON COLUMN project.lp_templates IS 'A JSON data structure that contains different templates for Launchpad';
+
+INSERT INTO LaunchpadDatabaseRevision VALUES (2211, 30, 0);
+
Follow ups