add check between git tag and specified app version
[brisk.git] / sql / sql.d / 070-add-mailmgmt.sql
diff --git a/sql/sql.d/070-add-mailmgmt.sql b/sql/sql.d/070-add-mailmgmt.sql
new file mode 100644 (file)
index 0000000..8f8057a
--- /dev/null
@@ -0,0 +1,13 @@
+--
+--  Table to manage mails sent to users
+--
+DROP TABLE #PFX#mails;
+CREATE TABLE #PFX#mails (
+       code       SERIAL PRIMARY KEY,
+       ucode      integer REFERENCES #PFX#users (code) ON DELETE cascade ON UPDATE cascade,
+       type       integer,                           -- type of email
+       tstamp     timestamp DEFAULT to_timestamp(0), -- insert time
+       subj       text,                              -- email subject
+       body_txt   text,                              -- email body (text version)
+       body_htm   text,                              -- email body (html version)
+       refs       text);                             -- email references