added domainname based retention support

This commit is contained in:
SJ
2013-07-31 10:57:45 +02:00
parent d1cae282dc
commit 8b18ce4896
6 changed files with 39 additions and 4 deletions

View File

@ -105,7 +105,7 @@ create table if not exists `tag` (
create table if not exists `archiving_rule` (
`id` bigint unsigned not null auto_increment,
`domain` varchar(255) default null,
`domain` varchar(128) default null,
`from` char(128) default null,
`to` char(255) default null,
`subject` char(255) default null,
@ -123,7 +123,7 @@ create table if not exists `archiving_rule` (
create table if not exists `retention_rule` (
`id` bigint unsigned not null auto_increment,
`domain` varchar(255) default null,
`domain` varchar(128) default null,
`from` char(128) default null,
`to` char(255) default null,
`subject` char(255) default null,
@ -135,7 +135,7 @@ create table if not exists `retention_rule` (
`spam` tinyint(1) default -1,
`days` int default 0,
primary key (`id`),
unique(`from`,`to`,`subject`,`_size`,`size`,`attachment_type`,`_attachment_size`,`attachment_size`,`spam`)
unique (`domain`,`from`,`to`,`subject`,`_size`,`size`,`attachment_type`,`_attachment_size`,`attachment_size`,`spam`)
) ENGINE=InnoDB;

View File

@ -7,6 +7,8 @@ create index `audit_idx5` on `audit`(`domain`);
alter table archiving_rule add column domain varchar(255) default null;
alter table retention_rule add column domain varchar(255) default null;
alter table retention_rule drop index `from`;
create unique index `entry` on retention_rule (`domain`,`from`,`to`,`subject`,`_size`,`size`,`attachment_type`,`_attachment_size`,`attachment_size`,`spam`);
create table if not exists `ldap` (
`id` int not null auto_increment primary key,