← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~pappacena/launchpad:gitrepo-status-column into launchpad:db-devel

 

Thiago F. Pappacena has proposed merging ~pappacena/launchpad:gitrepo-status-column into launchpad:db-devel.

Commit message:
Database patch to create GitRepository.status column.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~pappacena/launchpad/+git/launchpad/+merge/385199

This MP is just adding the column, a quick operation that should be done on a fast downtime deployment. The NOT NULL and default value constraint, together with an index, is being created in a hot db patch here: https://code.launchpad.net/~pappacena/launchpad/+git/launchpad/+merge/385198.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~pappacena/launchpad:gitrepo-status-column into launchpad:db-devel.
diff --git a/database/schema/patch-2210-17-0.sql b/database/schema/patch-2210-17-0.sql
new file mode 100644
index 0000000..ddb5ec6
--- /dev/null
+++ b/database/schema/patch-2210-17-0.sql
@@ -0,0 +1,11 @@
+-- Copyright 2020 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 GitRepository ADD COLUMN status INTEGER;
+
+COMMENT ON COLUMN GitRepository.status
+    IS 'The current situation of this git repository.';
+
+INSERT INTO LaunchpadDatabaseRevision VALUES (2210, 17, 0);

Follow ups