mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2025-12-22 22:31:40 +00:00
Show spam aliases #
This commit is contained in:
40
data/web/rc/SQL/sqlite/2010100600.sql
Normal file
40
data/web/rc/SQL/sqlite/2010100600.sql
Normal file
@@ -0,0 +1,40 @@
|
||||
-- Updates from version 0.4.2
|
||||
|
||||
DROP INDEX ix_users_username;
|
||||
CREATE UNIQUE INDEX ix_users_username ON users(username, mail_host);
|
||||
|
||||
CREATE TABLE contacts_tmp (
|
||||
contact_id integer NOT NULL PRIMARY KEY,
|
||||
user_id integer NOT NULL default '0',
|
||||
changed datetime NOT NULL default '0000-00-00 00:00:00',
|
||||
del tinyint NOT NULL default '0',
|
||||
name varchar(128) NOT NULL default '',
|
||||
email varchar(255) NOT NULL default '',
|
||||
firstname varchar(128) NOT NULL default '',
|
||||
surname varchar(128) NOT NULL default '',
|
||||
vcard text NOT NULL default ''
|
||||
);
|
||||
|
||||
INSERT INTO contacts_tmp (contact_id, user_id, changed, del, name, email, firstname, surname, vcard)
|
||||
SELECT contact_id, user_id, changed, del, name, email, firstname, surname, vcard FROM contacts;
|
||||
|
||||
DROP TABLE contacts;
|
||||
CREATE TABLE contacts (
|
||||
contact_id integer NOT NULL PRIMARY KEY,
|
||||
user_id integer NOT NULL default '0',
|
||||
changed datetime NOT NULL default '0000-00-00 00:00:00',
|
||||
del tinyint NOT NULL default '0',
|
||||
name varchar(128) NOT NULL default '',
|
||||
email varchar(255) NOT NULL default '',
|
||||
firstname varchar(128) NOT NULL default '',
|
||||
surname varchar(128) NOT NULL default '',
|
||||
vcard text NOT NULL default ''
|
||||
);
|
||||
|
||||
INSERT INTO contacts (contact_id, user_id, changed, del, name, email, firstname, surname, vcard)
|
||||
SELECT contact_id, user_id, changed, del, name, email, firstname, surname, vcard FROM contacts_tmp;
|
||||
|
||||
CREATE INDEX ix_contacts_user_id ON contacts(user_id, email);
|
||||
DROP TABLE contacts_tmp;
|
||||
|
||||
DELETE FROM messages;
|
||||
Reference in New Issue
Block a user