liquid_feedback_core

diff update/core-update.v3.1.0-v3.2.0.sql @ 496:044af1eec28b

New table "newsletter"
author jbe
date Sun Apr 03 20:46:10 2016 +0200 (2016-04-03)
parents bb420abbc2fa
children 91e3d31c1de2
line diff
     1.1 --- a/update/core-update.v3.1.0-v3.2.0.sql	Sun Apr 03 20:04:31 2016 +0200
     1.2 +++ b/update/core-update.v3.1.0-v3.2.0.sql	Sun Apr 03 20:46:10 2016 +0200
     1.3 @@ -36,6 +36,18 @@
     1.4          "last_suggestion_id"    INT8 );
     1.5  CREATE INDEX "initiative_notification_sent_initiative_idx" ON "initiative_notification_sent" ("initiative_id");
     1.6  
     1.7 +CREATE TABLE "newsletter" (
     1.8 +        "id"                    SERIAL4         PRIMARY KEY,
     1.9 +        "published"             TIMESTAMPTZ     NOT NULL,
    1.10 +        "unit_id"               INT4            REFERENCES "unit" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
    1.11 +        "include_all_members"   BOOLEAN         NOT NULL,
    1.12 +        "sent"                  TIMESTAMPTZ,
    1.13 +        "subject"               TEXT            NOT NULL,
    1.14 +        "content"               TEXT            NOT NULL );
    1.15 +CREATE INDEX "newsletter_unit_id_idx" ON "newsletter" ("unit_id", "published");
    1.16 +CREATE INDEX "newsletter_all_units_published_idx" ON "newsletter" ("published") WHERE "unit_id" ISNULL;
    1.17 +CREATE INDEX "newsletter_published_idx" ON "newsletter" ("published");
    1.18 +
    1.19  CREATE VIEW "updated_initiative" AS
    1.20    SELECT
    1.21      "supporter"."member_id" AS "seen_by_member_id",

Impressum / About Us