liquid_feedback_core
diff core.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/core.sql Sun Apr 03 20:04:31 2016 +0200 1.2 +++ b/core.sql Sun Apr 03 20:46:10 2016 +0200 1.3 @@ -1279,6 +1279,19 @@ 1.4 CREATE INDEX "initiative_notification_sent_initiative_idx" ON "initiative_notification_sent" ("initiative_id"); 1.5 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 + 1.20 1.21 ---------------------------------------------- 1.22 -- Writing of history entries and event log --