← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~cjwatson/launchpad/db-git-repository-type-not-null into lp:launchpad/db-devel

 

Colin Watson has proposed merging lp:~cjwatson/launchpad/db-git-repository-type-not-null into lp:launchpad/db-devel.

Commit message:
Make GitRepository.repository_type NOT NULL.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers): db

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/db-git-repository-type-not-null/+merge/310708

This has been true on all instances for a while, so we can now constrain it.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad/db-git-repository-type-not-null into lp:launchpad/db-devel.
=== added file 'database/schema/patch-2209-80-2.sql'
--- database/schema/patch-2209-80-2.sql	1970-01-01 00:00:00 +0000
+++ database/schema/patch-2209-80-2.sql	2016-11-12 20:51:42 +0000
@@ -0,0 +1,8 @@
+-- Copyright 2016 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 ALTER COLUMN repository_type SET NOT NULL;
+
+INSERT INTO LaunchpadDatabaseRevision VALUES (2209, 80, 2);