Add maildb

also, migrate values from settings table to maildb
This commit is contained in:
Girish Ramakrishnan
2018-01-20 22:17:53 -08:00
parent 777269810f
commit f93963540e
5 changed files with 182 additions and 1 deletions
+15
View File
@@ -157,3 +157,18 @@ CREATE TABLE IF NOT EXISTS domains(
/* the default db collation is utf8mb4_unicode_ci but for the app table domain constraint we have to use the old one */
CHARACTER SET utf8 COLLATE utf8_bin;
CREATE TABLE IF NOT EXISTS maildb(
domain VARCHAR(128) NOT NULL UNIQUE,
enabled BOOLEAN DEFAULT 0, /* MDA enabled */
mailFromValidation BOOLEAN DEFAULT 1,
catchAllJson TEXT,
relayJson TEXT,
FOREIGN KEY(domain) REFERENCES domains(domain),
PRIMARY KEY(domain))
CHARACTER SET utf8 COLLATE utf8_bin;