← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~cjwatson/launchpad/db-codeimport-git-url-per-target-rcs into lp:launchpad

 

Colin Watson has proposed merging lp:~cjwatson/launchpad/db-codeimport-git-url-per-target-rcs into lp:launchpad.

Commit message:
Split the unique CodeImport(url) index into one for each target RCS type.

Requested reviews:
  William Grant (wgrant): db

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/db-codeimport-git-url-per-target-rcs/+merge/310872

See https://code.launchpad.net/~cjwatson/launchpad/codeimport-git-url-per-target-rcs/+merge/310696 for rationale.

To be applied hot.
-- 
Your team Launchpad code reviewers is subscribed to branch lp:launchpad.
=== added file 'database/schema/patch-2209-80-1.sql'
--- database/schema/patch-2209-80-1.sql	1970-01-01 00:00:00 +0000
+++ database/schema/patch-2209-80-1.sql	2016-11-15 12:27:59 +0000
@@ -0,0 +1,12 @@
+-- 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;
+
+DROP INDEX codeimport__url__idx;
+CREATE UNIQUE INDEX codeimport__url__branch__idx
+    ON CodeImport(url) WHERE branch IS NOT NULL;
+CREATE UNIQUE INDEX codeimport__url__git_repository__idx
+    ON CodeImport(url) WHERE git_repository IS NOT NULL;
+
+INSERT INTO LaunchpadDatabaseRevision VALUES (2209, 80, 1);


Follow ups