recreate
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
-- USE vmail;
|
||||
|
||||
-- DROP column
|
||||
ALTER TABLE mailbox DROP COLUMN local_part;
|
||||
|
||||
-- New SQL column
|
||||
ALTER TABLE mailbox ADD COLUMN enableimaptls TINYINT(1) NOT NULL DEFAULT 1;
|
||||
ALTER TABLE mailbox ADD INDEX (enableimaptls);
|
||||
ALTER TABLE mailbox ADD COLUMN enablepop3tls TINYINT(1) NOT NULL DEFAULT 1;
|
||||
ALTER TABLE mailbox ADD INDEX (enablepop3tls);
|
||||
ALTER TABLE mailbox ADD COLUMN enablesievetls TINYINT(1) NOT NULL DEFAULT 1;
|
||||
ALTER TABLE mailbox ADD INDEX (enablesievetls);
|
||||
|
||||
-- Rename table
|
||||
RENAME TABLE alias_moderators TO moderators;
|
||||
|
||||
-- Column used to limit number of mailing lists a domain admin can create
|
||||
ALTER TABLE domain ADD COLUMN maillists INT(10) NOT NULL DEFAULT 0;
|
||||
|
||||
-- Column used to mark sql record is a mailing list
|
||||
ALTER TABLE forwardings ADD COLUMN `is_maillist` TINYINT(1) NOT NULL DEFAULT 0;
|
||||
ALTER TABLE forwardings ADD INDEX (`is_maillist`);
|
||||
|
||||
-- Table used to store mailing list accounts
|
||||
CREATE TABLE IF NOT EXISTS maillists (
|
||||
id BIGINT(20) UNSIGNED AUTO_INCREMENT,
|
||||
address VARCHAR(255) NOT NULL DEFAULT '',
|
||||
domain VARCHAR(255) NOT NULL DEFAULT '',
|
||||
-- Per mailing list transport. for example: 'mlmmj:example.com/listname'.
|
||||
transport VARCHAR(255) NOT NULL DEFAULT '',
|
||||
accesspolicy VARCHAR(30) NOT NULL DEFAULT '',
|
||||
maxmsgsize BIGINT(20) NOT NULL DEFAULT 0,
|
||||
-- name of the mailing list
|
||||
name VARCHAR(255) NOT NULL DEFAULT '',
|
||||
-- short introduction of the mailing list on subscription page
|
||||
description TEXT,
|
||||
-- a server-wide unique id (a 36-characters string) for each mailing list
|
||||
mlid VARCHAR(36) NOT NULL DEFAULT '',
|
||||
-- control whether newsletter-style subscription from website is enabled
|
||||
-- 1 -> enabled, 0 -> disabled
|
||||
is_newsletter TINYINT(1) NOT NULL DEFAULT 0,
|
||||
settings TEXT,
|
||||
created DATETIME NOT NULL DEFAULT '1970-01-01 01:01:01',
|
||||
modified DATETIME NOT NULL DEFAULT '1970-01-01 01:01:01',
|
||||
expired DATETIME NOT NULL DEFAULT '9999-12-31 00:00:00',
|
||||
active TINYINT(1) NOT NULL DEFAULT 1,
|
||||
PRIMARY KEY (id),
|
||||
UNIQUE INDEX (address),
|
||||
UNIQUE INDEX (mlid),
|
||||
INDEX (is_newsletter),
|
||||
INDEX (domain),
|
||||
INDEX (active)
|
||||
) ENGINE=InnoDB;
|
||||
Reference in New Issue
Block a user