liquid_feedback_core

annotate core-update.beta17-beta18.sql @ 19:549b1a0fc042

Changed version to "beta19-dev"; Changed year in LICENSE to "2009-2010"
author jbe
date Sat Feb 06 03:24:51 2010 +0100 (2010-02-06)
parents 1cba764373d6
children
rev   line source
jbe@17 1 BEGIN;
jbe@17 2
jbe@17 3 CREATE OR REPLACE VIEW "liquid_feedback_version" AS
jbe@17 4 SELECT * FROM (VALUES ('beta18', NULL, NULL, NULL))
jbe@17 5 AS "subquery"("string", "major", "minor", "revision");
jbe@17 6
jbe@17 7 CREATE OR REPLACE VIEW "timeline_issue" AS
jbe@17 8 SELECT
jbe@17 9 "created" AS "occurrence",
jbe@17 10 'issue_created'::"timeline_event" AS "event",
jbe@17 11 "id" AS "issue_id"
jbe@17 12 FROM "issue"
jbe@17 13 UNION ALL
jbe@17 14 SELECT
jbe@17 15 "closed" AS "occurrence",
jbe@17 16 'issue_canceled'::"timeline_event" AS "event",
jbe@17 17 "id" AS "issue_id"
jbe@17 18 FROM "issue" WHERE "closed" NOTNULL AND "fully_frozen" ISNULL
jbe@17 19 UNION ALL
jbe@17 20 SELECT
jbe@17 21 "accepted" AS "occurrence",
jbe@17 22 'issue_accepted'::"timeline_event" AS "event",
jbe@17 23 "id" AS "issue_id"
jbe@17 24 FROM "issue" WHERE "accepted" NOTNULL
jbe@17 25 UNION ALL
jbe@17 26 SELECT
jbe@17 27 "half_frozen" AS "occurrence",
jbe@17 28 'issue_half_frozen'::"timeline_event" AS "event",
jbe@17 29 "id" AS "issue_id"
jbe@17 30 FROM "issue" WHERE "half_frozen" NOTNULL
jbe@17 31 UNION ALL
jbe@17 32 SELECT
jbe@17 33 "fully_frozen" AS "occurrence",
jbe@17 34 'issue_voting_started'::"timeline_event" AS "event",
jbe@17 35 "id" AS "issue_id"
jbe@17 36 FROM "issue"
jbe@17 37 WHERE "fully_frozen" NOTNULL
jbe@17 38 AND ("closed" ISNULL OR "closed" != "fully_frozen")
jbe@17 39 UNION ALL
jbe@17 40 SELECT
jbe@17 41 "closed" AS "occurrence",
jbe@17 42 CASE WHEN "fully_frozen" = "closed" THEN
jbe@17 43 'issue_finished_without_voting'::"timeline_event"
jbe@17 44 ELSE
jbe@17 45 'issue_finished_after_voting'::"timeline_event"
jbe@17 46 END AS "event",
jbe@17 47 "id" AS "issue_id"
jbe@17 48 FROM "issue" WHERE "closed" NOTNULL AND "fully_frozen" NOTNULL;
jbe@17 49
jbe@17 50 COMMIT;

Impressum / About Us