# HG changeset patch # User jbe # Date 1346007860 -7200 # Node ID 703986b6de291feeda8ad66ae0befd0039b6a43b # Parent 9ab561a910359f7f6967f0be891bdddc2c000078 Correctly transform existing "contingent" entries when updating to v2.1.0 diff -r 9ab561a91035 -r 703986b6de29 update/core-update.v2.0.11-v2.1.0.sql --- a/update/core-update.v2.0.11-v2.1.0.sql Sat Aug 25 20:55:33 2012 +0200 +++ b/update/core-update.v2.0.11-v2.1.0.sql Sun Aug 26 21:04:20 2012 +0200 @@ -59,8 +59,9 @@ DROP VIEW "member_contingent"; ALTER TABLE "contingent" DROP CONSTRAINT "contingent_pkey"; ALTER TABLE "contingent" ALTER COLUMN "time_frame" DROP NOT NULL; -ALTER TABLE "contingent" ADD COLUMN "polling" BOOLEAN; +ALTER TABLE "contingent" ADD COLUMN "polling" BOOLEAN DEFAULT FALSE; ALTER TABLE "contingent" ADD PRIMARY KEY ("polling", "time_frame"); +ALTER TABLE "contingent" ALTER COLUMN "polling" DROP DEFAULT; COMMENT ON COLUMN "contingent"."polling" IS 'Determines if settings are for creating initiatives and new drafts of initiatives with "polling" flag set'; CREATE VIEW "member_contingent" AS