Commits

jbe  committed 1af482e

Added "rendered_draft" table for caching
(Version number updated to v1.2.3, update script included)

  • Participants
  • Parent commits bc01495
  • Tags v1.2.3

Comments (0)

Files changed (2)

 BEGIN;
 
 CREATE VIEW "liquid_feedback_version" AS
-  SELECT * FROM (VALUES ('1.2.2', 1, 2, 2))
+  SELECT * FROM (VALUES ('1.2.3', 1, 2, 3))
   AS "subquery"("string", "major", "minor", "revision");
 
 
 COMMENT ON COLUMN "draft"."content"           IS 'Text of the draft in a format depending on the field "formatting_engine"';
 
 
+CREATE TABLE "rendered_draft" (
+        PRIMARY KEY ("draft_id", "format"),
+        "draft_id"              INT8            REFERENCES "draft" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
+        "format"                TEXT,
+        "content"               TEXT            NOT NULL );
+
+COMMENT ON TABLE "rendered_draft" IS 'This table may be used by frontends to cache "rendered" drafts (e.g. HTML output generated from wiki text)';
+
+
 CREATE TABLE "suggestion" (
         UNIQUE ("initiative_id", "id"),  -- index needed for foreign-key on table "opinion"
         "initiative_id"         INT4            NOT NULL REFERENCES "initiative" ("id") ON DELETE CASCADE ON UPDATE CASCADE,

File update/core-update.v1.2.2-v1.2.3.sql

+BEGIN;
+
+CREATE OR REPLACE VIEW "liquid_feedback_version" AS
+  SELECT * FROM (VALUES ('1.2.3', 1, 2, 3))
+  AS "subquery"("string", "major", "minor", "revision");
+
+CREATE TABLE "rendered_draft" (
+        PRIMARY KEY ("draft_id", "format"),
+        "draft_id"              INT8            REFERENCES "draft" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
+        "format"                TEXT,
+        "content"               TEXT            NOT NULL );
+
+COMMENT ON TABLE "rendered_draft" IS 'This table may be used by frontends to cache "rendered" drafts (e.g. HTML output generated from wiki text)';
+
+COMMIT;