X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/d4925a8b60f04674885e30d9316dc0263f8b9a84..b293ff8ad52fc76ba0c44783e3982418114d6b08:/sql/Pg-upgrade2/file_full_texts.sql

diff --git a/sql/Pg-upgrade2/file_full_texts.sql b/sql/Pg-upgrade2/file_full_texts.sql
new file mode 100644
index 000000000..f479da137
--- /dev/null
+++ b/sql/Pg-upgrade2/file_full_texts.sql
@@ -0,0 +1,15 @@
+-- @tag: file_full_texts
+-- @description: Tabelle f. Volltext-Suche anlegen
+-- @depends: release_3_6_0
+
+CREATE TABLE IF NOT EXISTS file_full_texts (
+   id           SERIAL,
+   file_id      INTEGER            NOT NULL REFERENCES files(id) ON DELETE CASCADE,
+   full_text    TEXT               NOT NULL,
+   itime        TIMESTAMP          NOT NULL DEFAULT now(),
+   mtime        TIMESTAMP,
+
+   PRIMARY KEY (id)
+);
+
+CREATE TRIGGER mtime_file_full_texts BEFORE UPDATE ON file_full_texts FOR EACH ROW EXECUTE PROCEDURE set_mtime();
