~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to database/schema/patch-2208-64-0.sql

  • Committer: Steve Kowalik
  • Date: 2011-05-09 10:13:32 UTC
  • mto: (7675.1045.340 db-devel)
  • mto: This revision was merged to the branch mainline in revision 13163.
  • Revision ID: stevenk@ubuntu.com-20110509101332-jzji8pj5xbczyhh8
I can spel.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
ALTER TABLE DistroSeriesDifference
6
6
    ADD COLUMN parent_series INTEGER
7
7
        CONSTRAINT distroseriesdifference__parentseries__fk REFERENCES distroseries;
 
8
-- Because of the likelihood of staging and production having existing data,
8
9
-- we need to set it, but only for Ubuntu.
9
10
UPDATE DistroSeriesDifference SET parent_series = (SELECT id from DistroSeries WHERE name = 'sid') FROM Distribution, DistroSeries WHERE Distribution.name = 'ubuntu' AND DistroSeries.id = derived_series AND DistroSeries.distribution = Distribution.id;
10
11
ALTER TABLE DistroSeriesDifference ALTER COLUMN parent_series SET NOT NULL;