liquid_feedback_core

view update/core-update.beta17-beta18.sql @ 113:76ffbafb23b5

Work on event and notification system; Added more "issue_state"s; Replaced "ignored_issue" table; Removal of sessions in "delete_member" function

- "state" column of table "event" is now always filled
- splitted revocation state into 3 new "issue_state"s:
- 'canceled_revoked_before_accepted'
- 'canceled_after_revocation_during_discussion'
- 'canceled_after_revocation_during_verification'
- Added columns "notify_level" and "notify_event_id" to "member" table
- Replaced view "ignored_issue" by three new views:
- TABLE "ignored_member"
- TABLE "ignored_initiative"
- TABLE "non_voter"
- Function "delete_member" now removes "session"s
- Added member specific views on events:
- VIEW "event_seen_by_member"
- VIEW "pending_notification"
author jbe
date Sat Mar 05 22:05:13 2011 +0100 (2011-03-05)
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;

Impressum / About Us