Code review comment for lp:~wgrant/launchpad/sprbu-columns-to-sprb

Revision history for this message
Stuart Bishop (stub) wrote :

Discussed with bigjools, so SourcepackageRecipeBuildUpload should go. The following patch is approved as patch-2207-32-0.sql. It will need the latest db-devel to work (I just noticed the todrop schema doesn't exist in developer databases any more, stopping us dropping tables). If dropping the table causes test failures you can't be bothered fixing, feel free to comment out that line and open a bug instead.

SET client_min_messages=ERROR;

ALTER TABLE SourcePackageRecipeBuild ADD COLUMN dependencies text;
ALTER TABLE SourcePackageRecipeBuild ADD COLUMN pocket integer
    DEFAULT 0 NOT NULL;
ALTER TABLE SourcePackageRecipeBuild ADD COLUMN upload_log integer
    CONSTRAINT sourcepackagerecipebuild__upload_log__fk
    REFERENCES LibraryFileAlias;

CREATE INDEX sourcepackagerecipebuild__upload_log__idx
    ON SourcePackageRecipeBuild(upload_log) WHERE upload_log IS NOT NULL;

-- We can't drop tables in DB patches due to Slony-I limitations, so
-- we give them a magic name for database/schema/upgrade.py to deal
-- with correctly.
ALTER TABLE SourcePackageRecipeBuildUpload SET SCHEMA todrop;

INSERT INTO LaunchpadDatabaseRevision VALUES (2207, 32, 0);

review: Approve (db)

« Back to merge proposal