# HG changeset patch # User jbe # Date 1258542000 -3600 # Node ID 3ea7a72ed7e70c148090f1d77fb194ff5a1c6573 # Parent 1cbdd3975a615f585a808848f68af2a9fac1a097 Version beta7 Fixed bug in function close_voting(...) leading to wrong voter_count values in issue table Added avatar column to member table for storing a small picture of the member diff -r 1cbdd3975a61 -r 3ea7a72ed7e7 core.sql --- a/core.sql Tue Nov 17 12:00:00 2009 +0100 +++ b/core.sql Wed Nov 18 12:00:00 2009 +0100 @@ -6,7 +6,7 @@ BEGIN; CREATE VIEW "liquid_feedback_version" AS - SELECT * FROM (VALUES ('beta6', NULL, NULL, NULL)) + SELECT * FROM (VALUES ('beta7', NULL, NULL, NULL)) AS "subquery"("string", "major", "minor", "revision"); @@ -23,7 +23,8 @@ "active" BOOLEAN NOT NULL DEFAULT TRUE, "admin" BOOLEAN NOT NULL DEFAULT FALSE, "name" TEXT, - "ident_number" TEXT UNIQUE ); + "ident_number" TEXT UNIQUE, + "avatar" BYTEA ); CREATE INDEX "member_active_idx" ON "member" ("active"); COMMENT ON TABLE "member" IS 'Users of the system, e.g. members of an organization'; @@ -2041,7 +2042,8 @@ "voter_count" = ( SELECT coalesce(sum("weight"), 0) FROM "direct_voter" WHERE "issue_id" = "issue_id_p" - ); + ) + WHERE "id" = "issue_id_p"; UPDATE "initiative" SET "positive_votes" = "subquery"."positive_votes", "negative_votes" = "subquery"."negative_votes"