liquid_feedback_core
view update/core-update.beta17-beta18.sql @ 94:fb9688f31740
Corrected "delete_member" and "delete_private_data" functions to refer to "ignored_issue" table instead of non-existing "ignored_voting" table; Delete "ignored_issue" entries in "clean_issue" function as well
| author | jbe | 
|---|---|
| date | Sun Oct 31 02:38:05 2010 +0200 (2010-10-31) | 
| parents | f0460e206bc6 | 
| children | 
 line source
     1 BEGIN;
     3 CREATE OR REPLACE VIEW "liquid_feedback_version" AS
     4   SELECT * FROM (VALUES ('beta18', NULL, NULL, NULL))
     5   AS "subquery"("string", "major", "minor", "revision");
     7 CREATE OR REPLACE VIEW "timeline_issue" AS
     8     SELECT
     9       "created" AS "occurrence",
    10       'issue_created'::"timeline_event" AS "event",
    11       "id" AS "issue_id"
    12     FROM "issue"
    13   UNION ALL
    14     SELECT
    15       "closed" AS "occurrence",
    16       'issue_canceled'::"timeline_event" AS "event",
    17       "id" AS "issue_id"
    18     FROM "issue" WHERE "closed" NOTNULL AND "fully_frozen" ISNULL
    19   UNION ALL
    20     SELECT
    21       "accepted" AS "occurrence",
    22       'issue_accepted'::"timeline_event" AS "event",
    23       "id" AS "issue_id"
    24     FROM "issue" WHERE "accepted" NOTNULL
    25   UNION ALL
    26     SELECT
    27       "half_frozen" AS "occurrence",
    28       'issue_half_frozen'::"timeline_event" AS "event",
    29       "id" AS "issue_id"
    30     FROM "issue" WHERE "half_frozen" NOTNULL
    31   UNION ALL
    32     SELECT
    33       "fully_frozen" AS "occurrence",
    34       'issue_voting_started'::"timeline_event" AS "event",
    35       "id" AS "issue_id"
    36     FROM "issue"
    37     WHERE "fully_frozen" NOTNULL
    38     AND ("closed" ISNULL OR "closed" != "fully_frozen")
    39   UNION ALL
    40     SELECT
    41       "closed" AS "occurrence",
    42       CASE WHEN "fully_frozen" = "closed" THEN
    43         'issue_finished_without_voting'::"timeline_event"
    44       ELSE
    45         'issue_finished_after_voting'::"timeline_event"
    46       END AS "event",
    47       "id" AS "issue_id"
    48     FROM "issue" WHERE "closed" NOTNULL AND "fully_frozen" NOTNULL;
    50 COMMIT;
