liquid_feedback_core
changeset 337:c8289a674ef2
Removed deprecated timeline views
author | jbe |
---|---|
date | Wed Feb 20 23:58:09 2013 +0100 (2013-02-20) |
parents | a7537038640d |
children | 705c29b0ed44 |
files | core.sql |
line diff
1.1 --- a/core.sql Wed Feb 20 02:56:49 2013 +0100 1.2 +++ b/core.sql Wed Feb 20 23:58:09 2013 +0100 1.3 @@ -2278,144 +2278,6 @@ 1.4 COMMENT ON VIEW "selected_event_seen_by_member" IS 'Events as seen by a member, depending on its memberships, interests, support and members "notify_level"'; 1.5 1.6 1.7 -CREATE TYPE "timeline_event" AS ENUM ( 1.8 - 'issue_created', 1.9 - 'issue_canceled', 1.10 - 'issue_accepted', 1.11 - 'issue_half_frozen', 1.12 - 'issue_finished_without_voting', 1.13 - 'issue_voting_started', 1.14 - 'issue_finished_after_voting', 1.15 - 'initiative_created', 1.16 - 'initiative_revoked', 1.17 - 'draft_created', 1.18 - 'suggestion_created'); 1.19 - 1.20 -COMMENT ON TYPE "timeline_event" IS 'Types of event in timeline tables (DEPRECATED)'; 1.21 - 1.22 - 1.23 -CREATE VIEW "timeline_issue" AS 1.24 - SELECT 1.25 - "created" AS "occurrence", 1.26 - 'issue_created'::"timeline_event" AS "event", 1.27 - "id" AS "issue_id" 1.28 - FROM "issue" 1.29 - UNION ALL 1.30 - SELECT 1.31 - "closed" AS "occurrence", 1.32 - 'issue_canceled'::"timeline_event" AS "event", 1.33 - "id" AS "issue_id" 1.34 - FROM "issue" WHERE "closed" NOTNULL AND "fully_frozen" ISNULL 1.35 - UNION ALL 1.36 - SELECT 1.37 - "accepted" AS "occurrence", 1.38 - 'issue_accepted'::"timeline_event" AS "event", 1.39 - "id" AS "issue_id" 1.40 - FROM "issue" WHERE "accepted" NOTNULL 1.41 - UNION ALL 1.42 - SELECT 1.43 - "half_frozen" AS "occurrence", 1.44 - 'issue_half_frozen'::"timeline_event" AS "event", 1.45 - "id" AS "issue_id" 1.46 - FROM "issue" WHERE "half_frozen" NOTNULL 1.47 - UNION ALL 1.48 - SELECT 1.49 - "fully_frozen" AS "occurrence", 1.50 - 'issue_voting_started'::"timeline_event" AS "event", 1.51 - "id" AS "issue_id" 1.52 - FROM "issue" 1.53 - WHERE "fully_frozen" NOTNULL 1.54 - AND ("closed" ISNULL OR "closed" != "fully_frozen") 1.55 - UNION ALL 1.56 - SELECT 1.57 - "closed" AS "occurrence", 1.58 - CASE WHEN "fully_frozen" = "closed" THEN 1.59 - 'issue_finished_without_voting'::"timeline_event" 1.60 - ELSE 1.61 - 'issue_finished_after_voting'::"timeline_event" 1.62 - END AS "event", 1.63 - "id" AS "issue_id" 1.64 - FROM "issue" WHERE "closed" NOTNULL AND "fully_frozen" NOTNULL; 1.65 - 1.66 -COMMENT ON VIEW "timeline_issue" IS 'Helper view for "timeline" view (DEPRECATED)'; 1.67 - 1.68 - 1.69 -CREATE VIEW "timeline_initiative" AS 1.70 - SELECT 1.71 - "created" AS "occurrence", 1.72 - 'initiative_created'::"timeline_event" AS "event", 1.73 - "id" AS "initiative_id" 1.74 - FROM "initiative" 1.75 - UNION ALL 1.76 - SELECT 1.77 - "revoked" AS "occurrence", 1.78 - 'initiative_revoked'::"timeline_event" AS "event", 1.79 - "id" AS "initiative_id" 1.80 - FROM "initiative" WHERE "revoked" NOTNULL; 1.81 - 1.82 -COMMENT ON VIEW "timeline_initiative" IS 'Helper view for "timeline" view (DEPRECATED)'; 1.83 - 1.84 - 1.85 -CREATE VIEW "timeline_draft" AS 1.86 - SELECT 1.87 - "created" AS "occurrence", 1.88 - 'draft_created'::"timeline_event" AS "event", 1.89 - "id" AS "draft_id" 1.90 - FROM "draft"; 1.91 - 1.92 -COMMENT ON VIEW "timeline_draft" IS 'Helper view for "timeline" view (DEPRECATED)'; 1.93 - 1.94 - 1.95 -CREATE VIEW "timeline_suggestion" AS 1.96 - SELECT 1.97 - "created" AS "occurrence", 1.98 - 'suggestion_created'::"timeline_event" AS "event", 1.99 - "id" AS "suggestion_id" 1.100 - FROM "suggestion"; 1.101 - 1.102 -COMMENT ON VIEW "timeline_suggestion" IS 'Helper view for "timeline" view (DEPRECATED)'; 1.103 - 1.104 - 1.105 -CREATE VIEW "timeline" AS 1.106 - SELECT 1.107 - "occurrence", 1.108 - "event", 1.109 - "issue_id", 1.110 - NULL AS "initiative_id", 1.111 - NULL::INT8 AS "draft_id", -- TODO: Why do we need a type-cast here? Is this due to 32 bit architecture? 1.112 - NULL::INT8 AS "suggestion_id" 1.113 - FROM "timeline_issue" 1.114 - UNION ALL 1.115 - SELECT 1.116 - "occurrence", 1.117 - "event", 1.118 - NULL AS "issue_id", 1.119 - "initiative_id", 1.120 - NULL AS "draft_id", 1.121 - NULL AS "suggestion_id" 1.122 - FROM "timeline_initiative" 1.123 - UNION ALL 1.124 - SELECT 1.125 - "occurrence", 1.126 - "event", 1.127 - NULL AS "issue_id", 1.128 - NULL AS "initiative_id", 1.129 - "draft_id", 1.130 - NULL AS "suggestion_id" 1.131 - FROM "timeline_draft" 1.132 - UNION ALL 1.133 - SELECT 1.134 - "occurrence", 1.135 - "event", 1.136 - NULL AS "issue_id", 1.137 - NULL AS "initiative_id", 1.138 - NULL AS "draft_id", 1.139 - "suggestion_id" 1.140 - FROM "timeline_suggestion"; 1.141 - 1.142 -COMMENT ON VIEW "timeline" IS 'Aggregation of different events in the system (DEPRECATED)'; 1.143 - 1.144 - 1.145 1.146 ------------------------------------------------------ 1.147 -- Row set returning function for delegation chains --