Raphaël Victor Badin has proposed merging lp:~rvb/launchpad/fix-dsd-unique-constraint into lp:launchpad/db-devel.
Requested reviews: Robert Collins (lifeless): db Stuart Bishop (stub): db Launchpad code reviewers (launchpad-reviewers) Related bugs: Bug #779868 in Launchpad itself: "Fix DSD unique constraint." https://bugs.launchpad.net/launchpad/+bug/779868 For more details, see: https://code.launchpad.net/~rvb/launchpad/fix-dsd-unique-constraint/+merge/60363 This branch fixes the UNIQUE constraint in DistroSeriesDifference. The constraint UNIQUE (derived_series, source_package_name) should be UNIQUE (derived_series, parent_series, source_package_name). (Proper tests for this will follow shortly in another branch) = Q/A = None = Tests = None -- https://code.launchpad.net/~rvb/launchpad/fix-dsd-unique-constraint/+merge/60363 Your team Launchpad code reviewers is requested to review the proposed merge of lp:~rvb/launchpad/fix-dsd-unique-constraint into lp:launchpad/db-devel.
=== added file 'database/schema/patch-2208-99-0.sql' --- database/schema/patch-2208-99-0.sql 1970-01-01 00:00:00 +0000 +++ database/schema/patch-2208-99-0.sql 2011-05-09 11:39:32 +0000 @@ -0,0 +1,15 @@ +-- Copyright 2011 Canonical Ltd. This software is licensed under the +-- GNU Affero General Public License version 3 (see the file LICENSE). + +SET client_min_messages=ERROR; + +-- In DistroSeriesDifference, the constraint UNIQUE (derived_series, source_package_name) +-- should be UNIQUE (derived_series, parent_series, source_package_name). +ALTER TABLE DistroSeriesDifference + DROP CONSTRAINT "distroseriesdifference__derived_series__source_package_name__key"; + +ALTER TABLE DistroSeriesDifference + ADD CONSTRAINT distroseriesdifference__derived_series__parent_series__source_package_name__key + UNIQUE (derived_series, parent_series, source_package_name); + +INSERT INTO LaunchpadDatabaseRevision VALUES (2208, 99, 0);
_______________________________________________ Mailing list: https://launchpad.net/~launchpad-reviewers Post to : [email protected] Unsubscribe : https://launchpad.net/~launchpad-reviewers More help : https://help.launchpad.net/ListHelp

