# HG changeset patch # User jbe # Date 1307559126 -7200 # Node ID fb2394116b39283d3b4031e6f9cf982c90cd3b27 # Parent 184b023a5b1d1f03a1dffa5a5aa0b0b14f8f26b5 Update script to v1.5.0: Drop "battle_view" before modifying "initiative" table diff -r 184b023a5b1d -r fb2394116b39 update/core-update.v1.4.0-v1.5.0.sql --- a/update/core-update.v1.4.0-v1.5.0.sql Wed Jun 08 20:47:19 2011 +0200 +++ b/update/core-update.v1.4.0-v1.5.0.sql Wed Jun 08 20:52:06 2011 +0200 @@ -81,6 +81,8 @@ COMMENT ON COLUMN "issue"."snapshot" IS 'Point in time, when snapshot tables have been updated and "population" and *_count values were precalculated'; COMMENT ON COLUMN "issue"."status_quo_schulze_rank" IS 'Schulze rank of status quo, as calculated by "calculate_ranks" function'; +DROP VIEW "battle_view"; + ALTER TABLE "initiative" DROP COLUMN "agreed"; ALTER TABLE "initiative" ADD COLUMN "direct_majority" BOOLEAN; ALTER TABLE "initiative" ADD COLUMN "indirect_majority" BOOLEAN; @@ -235,7 +237,7 @@ COMMENT ON VIEW "battle_participant" IS 'Helper view for "battle_view" containing admitted initiatives plus virtual "status-quo" initiative denoted by NULL reference'; -CREATE OR REPLACE VIEW "battle_view" AS +CREATE VIEW "battle_view" AS SELECT "issue"."id" AS "issue_id", "winning_initiative"."id" AS "winning_initiative_id",