Commit 9760d6ba authored by redray's avatar redray
Browse files

Fixed and optimized DB-Datatypes

Added new DB-Tables for domain-management and billing
parent 15a66767
/*
Copyright (c) 2007-2008, Till Brehm, projektfarm Gmbh
Copyright (c) 2007-2009, Till Brehm, projektfarm Gmbh
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
......@@ -29,39 +29,160 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--
-- ISPConfig 3
-- DB-Version: 3.0.0.8
-- DB-Version: 3.0.0.9
--
SET FOREIGN_KEY_CHECKS = 0;
-- --------------------------------------------------------
-- --------------------------------------------------------
-- DB-STRUCTURE
-- --------------------------------------------------------
-- --------------------------------------------------------
--
-- Table structure for table `client`
-- Table structure for table `billing_invoice`
--
SET FOREIGN_KEY_CHECKS = 0;
CREATE TABLE `billing_invoice` (
`id` int(11) unsigned NOT NULL auto_increment,
`sys_userid` int(11) unsigned NOT NULL default '0',
`sys_groupid` int(11) unsigned NOT NULL default '0',
`sys_perm_user` varchar(5) default NULL,
`sys_perm_group` varchar(5) default NULL,
`sys_perm_all` varchar(5) default NULL,
`invoice_number` varchar(32) NOT NULL default '',
`invoice_date` date default NULL,
`xml` longtext NOT NULL,
`total_fee` decimal(10,2) NOT NULL default '0.00',
`total_fee_taxed` decimal(10,2) NOT NULL default '0.00',
`currency` char(3) default 'EUR',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1;
-- --------------------------------------------------------
--
-- Table structure for table `billing_product`
--
CREATE TABLE `billing_product` (
`id` int(11) unsigned NOT NULL auto_increment,
`sys_userid` int(11) unsigned NOT NULL default '0',
`sys_groupid` int(11) unsigned NOT NULL default '0',
`sys_perm_user` varchar(5) default NULL,
`sys_perm_group` varchar(5) default NULL,
`sys_perm_all` varchar(5) default NULL,
`parent_id` int(11) unsigned NOT NULL default '0',
`product_name` varchar(64) default NULL,
`product_details` varchar(255) default NULL,
`template_id` int(11) unsigned NOT NULL default '0',
`service_class_id` int(11) unsigned NOT NULL default '0',
`taxclass` int(11) unsigned NOT NULL default '0',
`setup_fee` decimal(10,2) NOT NULL default '0.00',
`interval_fee` decimal(10,2) NOT NULL default '0.00',
`interval_length` tinyint(3) NOT NULL default '0',
`interval_type` enum('non-recurring','hour','day','week','month','quarter','year') NOT NULL default 'non-recurring',
`interval_payment` enum('prepaid','postpaid') NOT NULL default 'prepaid',
`clearing_period` tinyint(3) unsigned default '1',
`currency` char(3) default 'EUR',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1;
-- --------------------------------------------------------
--
-- Table structure for table `billing_service`
--
CREATE TABLE `billing_service` (
`id` int(11) unsigned NOT NULL auto_increment,
`sys_userid` int(11) unsigned NOT NULL default '0',
`sys_groupid` int(11) unsigned NOT NULL default '0',
`sys_perm_user` varchar(5) default NULL,
`sys_perm_group` varchar(5) default NULL,
`sys_perm_all` varchar(5) default NULL,
`product_id` int(11) unsigned default NULL,
`product_parent_id` int(11) unsigned default NULL,
`product_name` varchar(64) default NULL,
`product_details` varchar(255) default NULL,
`service_class_id` int(11) unsigned default '0',
`service_template_id` int(11) unsigned default NULL,
`service_id` int(11) unsigned default NULL,
`taxclass` int(11) unsigned NOT NULL default '1',
`quantity` smallint(5) unsigned NOT NULL default '1',
`setup_fee` decimal(10,2) NOT NULL default '0.00',
`interval_fee` decimal(10,2) default '0.00',
`interval_fee_is_individual` tinyint(1) default '0',
`interval_length` int(11) NOT NULL default '1',
`interval_type` enum('non-recurring','hour','day','week','month','quarter','year') NOT NULL default 'non-recurring',
`interval_payment` enum('prepaid','postpaid') NOT NULL default 'prepaid',
`clearing_period` tinyint(3) unsigned default '1',
`currency` char(3) default 'EUR',
`is_active` tinyint(1) NOT NULL default '0',
`servicestart_at` date default NULL,
`serviceend_at` date default NULL,
`invoiced_upto` date default NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1;
-- --------------------------------------------------------
--
-- Table structure for table `billing_service_class`
--
CREATE TABLE `billing_service_class` (
`id` int(11) unsigned NOT NULL auto_increment,
`name` varchar(64) NOT NULL default '',
`sort_order` int(11) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1;
-- --------------------------------------------------------
--
-- Table structure for table `billing_tax_class`
--
CREATE TABLE `billing_tax_class` (
`id` int(11) unsigned NOT NULL auto_increment,
`name` varchar(64) NOT NULL default '',
`taxrate` decimal(10,2) default NULL,
`is_default` tinyint(1) NOT NULL default '0',
`valid_from` date default NULL,
`valid_till` date default NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1;
-- --------------------------------------------------------
--
-- Table structure for table `client`
--
CREATE TABLE `client` (
`client_id` bigint(20) NOT NULL auto_increment,
`sys_userid` int(11) NOT NULL default '0',
`sys_groupid` int(11) NOT NULL default '0',
`client_id` int(11) unsigned NOT NULL auto_increment,
`sys_userid` int(11) unsigned NOT NULL default '0',
`sys_groupid` int(11) unsigned NOT NULL default '0',
`sys_perm_user` varchar(5) default NULL,
`sys_perm_group` varchar(5) default NULL,
`sys_perm_other` varchar(5) default NULL,
`company_name` varchar(255) default NULL,
`contact_name` varchar(255) default NULL,
`company_name` varchar(64) default NULL,
`contact_name` varchar(64) default NULL,
`street` varchar(255) default NULL,
`zip` varchar(255) default NULL,
`city` varchar(255) default NULL,
`state` varchar(255) default NULL,
`country` varchar(255) default NULL,
`telephone` varchar(255) default NULL,
`mobile` varchar(255) default NULL,
`fax` varchar(255) default NULL,
`zip` varchar(32) default NULL,
`city` varchar(64) default NULL,
`state` varchar(32) default NULL,
`country` char(2) default NULL,
`telephone` varchar(32) default NULL,
`mobile` varchar(32) default NULL,
`fax` varchar(32) default NULL,
`email` varchar(255) default NULL,
`internet` varchar(255) NOT NULL,
`icq` varchar(255) default NULL,
`icq` varchar(16) default NULL,
`notes` text,
`default_mailserver` int(11) NOT NULL default '1',
`default_mailserver` int(11) unsigned NOT NULL default '1',
`limit_maildomain` int(11) NOT NULL default '-1',
`limit_mailbox` int(11) NOT NULL default '-1',
`limit_mailalias` int(11) NOT NULL default '-1',
......@@ -74,7 +195,7 @@ CREATE TABLE `client` (
`limit_spamfilter_wblist` int(11) NOT NULL default '0',
`limit_spamfilter_user` int(11) NOT NULL default '0',
`limit_spamfilter_policy` int(11) NOT NULL default '0',
`default_webserver` int(11) NOT NULL default '1',
`default_webserver` int(11) unsigned NOT NULL default '1',
`limit_web_ip` text,
`limit_web_domain` int(11) NOT NULL default '-1',
`web_php_options` varchar(255) NOT NULL default 'no,fast-cgi,cgi,mod,suphp',
......@@ -83,21 +204,54 @@ CREATE TABLE `client` (
`limit_ftp_user` int(11) NOT NULL default '-1',
`limit_shell_user` int(11) NOT NULL default '0',
`ssh_chroot` varchar(255) NOT NULL DEFAULT 'no,jailkit,ssh-chroot',
`default_dnsserver` int(10) unsigned NOT NULL default '1',
`default_dnsserver` int(11) unsigned NOT NULL default '1',
`limit_dns_zone` int(11) NOT NULL default '-1',
`limit_dns_record` int(11) NOT NULL default '-1',
`default_dbserver` int(10) unsigned NOT NULL default '1',
`default_dbserver` int(11) NOT NULL default '1',
`limit_database` int(11) NOT NULL default '-1',
`limit_client` int(11) NOT NULL default '0',
`parent_client_id` int(10) unsigned NOT NULL default '0',
`username` varchar(255) default NULL,
`password` varchar(255) default NULL,
`language` varchar(255) NOT NULL default 'en',
`usertheme` varchar(255) NOT NULL default 'default',
`template_master` bigint(20) NOT NULL default '0',
`parent_client_id` int(11) unsigned NOT NULL default '0',
`username` varchar(64) default NULL,
`password` varchar(64) default NULL,
`language` char(2) NOT NULL default 'en',
`usertheme` varchar(32) NOT NULL default 'default',
`template_master` int(11) unsigned NOT NULL default '0',
`template_additional` varchar(255) NOT NULL default '',
`created_at` datetime default NULL,
PRIMARY KEY (`client_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 ;
) ENGINE=MyISAM AUTO_INCREMENT=1;
-- --------------------------------------------------------
--
-- Table structure for table `client_address_book`
--
CREATE TABLE `client_address_book` (
`address_book_id` int(11) unsigned NOT NULL auto_increment,
`sys_userid` int(11) unsigned NOT NULL default '0',
`sys_groupid` int(11) unsigned NOT NULL default '0',
`sys_perm_user` varchar(5) default NULL,
`sys_perm_group` varchar(5) default NULL,
`sys_perm_other` varchar(5) default NULL,
`role` enum('Standard','Other','Administrator','Abuse','Accounting','Owner','Emergency','Technician','Signatory') default 'Standard',
`entry_company` varchar(64) default NULL,
`entry_gender` enum('m','f') default NULL,
`entry_title` varchar(16) default NULL,
`entry_firstname` varchar(32) NOT NULL,
`entry_lastname` varchar(32) NOT NULL,
`entry_address1` varchar(64) default NULL,
`entry_address2` varchar(64) default NULL,
`entry_postcode` varchar(32) NOT NULL,
`entry_city` varchar(64) NOT NULL,
`entry_state` varchar(32) default NULL,
`entry_country` char(2) default NULL,
`entry_phone` varchar(32) default NULL,
`entry_fax` varchar(32) default NULL,
`entry_mobile` varchar(32) default NULL,
`entry_email` varchar(255) default NULL,
PRIMARY KEY (`address_book_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1;
-- --------------------------------------------------------
......@@ -106,8 +260,13 @@ CREATE TABLE `client` (
--
CREATE TABLE `client_template` (
`template_id` bigint(20) NOT NULL auto_increment,
`template_name` varchar(50) NOT NULL,
`template_id` int(11) unsigned NOT NULL auto_increment,
`sys_userid` int(11) unsigned NOT NULL default '0',
`sys_groupid` int(11) unsigned NOT NULL default '0',
`sys_perm_user` varchar(5) default NULL,
`sys_perm_group` varchar(5) default NULL,
`sys_perm_other` varchar(5) default NULL,
`template_name` varchar(64) NOT NULL,
`template_type` varchar(1) NOT NULL default 'm',
`limit_maildomain` int(11) NOT NULL default '-1',
`limit_mailbox` int(11) NOT NULL default '-1',
......@@ -131,13 +290,8 @@ CREATE TABLE `client_template` (
`limit_dns_record` int(11) NOT NULL default '-1',
`limit_database` int(11) NOT NULL default '-1',
`limit_client` int(11) NOT NULL default '0',
`sys_userid` int(11) NOT NULL default '0',
`sys_groupid` int(11) NOT NULL default '0',
`sys_perm_user` varchar(5) default NULL,
`sys_perm_group` varchar(5) default NULL,
`sys_perm_other` varchar(5) default NULL,
PRIMARY KEY (`template_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 ;
) ENGINE=MyISAM AUTO_INCREMENT=1;
-- --------------------------------------------------------
......@@ -146,23 +300,23 @@ CREATE TABLE `client_template` (
--
CREATE TABLE `dns_rr` (
`id` int(10) unsigned NOT NULL auto_increment,
`sys_userid` int(11) NOT NULL,
`sys_groupid` int(11) NOT NULL,
`id` int(11) unsigned NOT NULL auto_increment,
`sys_userid` int(11) unsigned NOT NULL,
`sys_groupid` int(11) unsigned NOT NULL,
`sys_perm_user` varchar(5) NOT NULL,
`sys_perm_group` varchar(5) NOT NULL,
`sys_perm_other` varchar(5) NOT NULL,
`server_id` int(11) NOT NULL default '1',
`zone` int(10) unsigned NOT NULL,
`name` char(64) NOT NULL,
`zone` int(11) unsigned NOT NULL,
`name` varchar(64) NOT NULL,
`type` enum('A','AAAA','ALIAS','CNAME','HINFO','MX','NAPTR','NS','PTR','RP','SRV','TXT') default NULL,
`data` char(128) NOT NULL,
`aux` int(10) unsigned NOT NULL default '0',
`ttl` int(10) unsigned NOT NULL default '86400',
`data` varchar(128) NOT NULL,
`aux` int(11) unsigned NOT NULL default '0',
`ttl` int(11) unsigned NOT NULL default '86400',
`active` enum('N','Y') NOT NULL default 'Y',
PRIMARY KEY (`id`),
UNIQUE KEY `rr` (`zone`,`name`,`type`,`data`)
) ENGINE=MyISAM AUTO_INCREMENT=1 ;
) ENGINE=MyISAM AUTO_INCREMENT=1;
-- --------------------------------------------------------
......@@ -172,27 +326,27 @@ CREATE TABLE `dns_rr` (
CREATE TABLE `dns_soa` (
`id` int(10) unsigned NOT NULL auto_increment,
`sys_userid` int(11) NOT NULL,
`sys_groupid` int(11) NOT NULL,
`sys_userid` int(11) unsigned NOT NULL,
`sys_groupid` int(11) unsigned NOT NULL,
`sys_perm_user` varchar(5) NOT NULL,
`sys_perm_group` varchar(5) NOT NULL,
`sys_perm_other` varchar(5) NOT NULL,
`server_id` int(11) NOT NULL default '1',
`origin` char(255) NOT NULL,
`ns` char(255) NOT NULL,
`mbox` char(255) NOT NULL,
`serial` int(10) unsigned NOT NULL default '1',
`refresh` int(10) unsigned NOT NULL default '28800',
`retry` int(10) unsigned NOT NULL default '7200',
`expire` int(10) unsigned NOT NULL default '604800',
`minimum` int(10) unsigned NOT NULL default '86400',
`ttl` int(10) unsigned NOT NULL default '86400',
`active` enum('Y','N') NOT NULL,
`xfer` char(255) NOT NULL,
`origin` varchar(255) NOT NULL,
`ns` varchar(255) NOT NULL,
`mbox` varchar(255) NOT NULL,
`serial` int(11) unsigned NOT NULL default '1',
`refresh` int(11) unsigned NOT NULL default '28800',
`retry` int(11) unsigned NOT NULL default '7200',
`expire` int(11) unsigned NOT NULL default '604800',
`minimum` int(11) unsigned NOT NULL default '86400',
`ttl` int(11) unsigned NOT NULL default '86400',
`active` enum('N','Y') NOT NULL,
`xfer` varchar(255) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `origin` (`origin`),
KEY `active` (`active`)
) ENGINE=MyISAM AUTO_INCREMENT=1 ;
) ENGINE=MyISAM AUTO_INCREMENT=1;
-- --------------------------------------------------------
......@@ -201,24 +355,102 @@ CREATE TABLE `dns_soa` (
--
CREATE TABLE `dns_template` (
`template_id` bigint(20) NOT NULL auto_increment,
`sys_userid` int(11) NOT NULL default '0',
`sys_groupid` int(11) NOT NULL default '0',
`template_id` int(11) unsigned NOT NULL auto_increment,
`sys_userid` int(11) unsigned NOT NULL default '0',
`sys_groupid` int(11) unsigned NOT NULL default '0',
`sys_perm_user` varchar(5) default NULL,
`sys_perm_group` varchar(5) default NULL,
`sys_perm_other` varchar(5) default NULL,
`name` varchar(255) default NULL,
`name` varchar(64) default NULL,
`fields` varchar(255) default NULL,
`template` text,
`visible` varchar(255) NOT NULL default 'Y',
`visible` enum('N','Y') NOT NULL default 'Y',
PRIMARY KEY (`template_id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 ;
) ENGINE=MyISAM AUTO_INCREMENT=1;
-- --------------------------------------------------------
--
-- Dumping data for table `dns_template`
-- Table structure for table `domain`
--
INSERT INTO `dns_template` (`template_id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `name`, `fields`, `template`, `visible`) VALUES (1, 1, 1, 'riud', 'riud', '', 'Default', 'DOMAIN,IP,NS1,NS2,EMAIL', '[ZONE]\norigin={DOMAIN}.\nns={NS1}.\nmbox={EMAIL}.\nrefresh=28800\nretry=7200\nexpire=604800\nminimum=86400\nttl=86400\n\n[DNS_RECORDS]\nA|{DOMAIN}.|{IP}|0|86400\nA|www|{IP}|0|86400\nA|mail|{IP}|0|86400\nNS|{DOMAIN}.|{NS1}.|0|86400\nNS|{DOMAIN}.|{NS2}.|0|86400\nMX|{DOMAIN}.|mail.{DOMAIN}.|10|86400', 'y');
CREATE TABLE `domain` (
`domain_id` int(11) unsigned NOT NULL auto_increment,
`sys_userid` int(11) unsigned NOT NULL default '0',
`sys_groupid` int(11) unsigned NOT NULL default '0',
`sys_perm_user` varchar(5) default NULL,
`sys_perm_group` varchar(5) default NULL,
`sys_perm_all` varchar(5) default NULL,
`domain_provider_id` int(11) unsigned NOT NULL default '0',
`provider_domain_id` int(11) unsigned default NULL,
`domain` varchar(255) NOT NULL default '',
`tld` varchar(32) NOT NULL default '',
`handle_desc` varchar(32) default NULL,
`handle_adminc` varchar(32) default NULL,
`handle_techc` varchar(32) default NULL,
`handle_zonec` varchar(32) default NULL,
`added_at` timestamp NULL default NULL,
`connected_at` date default NULL,
`disconnected_at` date default NULL,
`status` varchar(64) NOT NULL default '0',
PRIMARY KEY (`domain_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1;
-- --------------------------------------------------------
--
-- Table structure for table `domain_handle`
--
CREATE TABLE `domain_handle` (
`id` int(11) unsigned NOT NULL auto_increment,
`sys_userid` int(11) unsigned NOT NULL default '0',
`sys_groupid` int(11) unsigned NOT NULL default '0',
`sys_perm_user` varchar(5) default NULL,
`sys_perm_group` varchar(5) default NULL,
`sys_perm_all` varchar(5) default NULL,
`domain_registrar` varchar(64) default NULL,
`handle` varchar(32) default NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1;
-- --------------------------------------------------------
--
-- Table structure for table `domain_provider`
--
CREATE TABLE `domain_provider` (
`id` int(11) unsigned NOT NULL auto_increment,
`sys_userid` int(11) unsigned NOT NULL default '0',
`sys_groupid` int(11) unsigned NOT NULL default '0',
`sys_perm_user` varchar(5) default NULL,
`sys_perm_group` varchar(5) default NULL,
`sys_perm_all` varchar(5) default NULL,
`provider` varchar(255) default NULL,
`is_extern` tinyint(1) NOT NULL default '0',
`domainrobot_interface` varchar(16) default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1;
-- --------------------------------------------------------
--
-- Table structure for table `domain_tld`
--
CREATE TABLE `domain_tld` (
`id` int(11) unsigned NOT NULL auto_increment,
`sys_userid` int(11) unsigned NOT NULL default '0',
`sys_groupid` int(11) unsigned NOT NULL default '0',
`sys_perm_user` varchar(5) default NULL,
`sys_perm_group` varchar(5) default NULL,
`sys_perm_all` varchar(5) default NULL,
`tld` varchar(32) default NULL,
`domain_provider_id` int(11) unsigned NOT NULL default '0',
`domain_registrar` varchar(64) default NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1;
-- --------------------------------------------------------
......@@ -227,18 +459,18 @@ INSERT INTO `dns_template` (`template_id`, `sys_userid`, `sys_groupid`, `sys_per
--
CREATE TABLE `firewall` (
`firewall_id` bigint(20) NOT NULL auto_increment,
`sys_userid` int(11) NOT NULL default '0',
`sys_groupid` int(11) NOT NULL default '0',
`firewall_id` int(11) unsigned NOT NULL auto_increment,
`sys_userid` int(11) unsigned NOT NULL default '0',
`sys_groupid` int(11) unsigned NOT NULL default '0',
`sys_perm_user` varchar(5) default NULL,
`sys_perm_group` varchar(5) default NULL,
`sys_perm_other` varchar(5) default NULL,
`server_id` int(11) NOT NULL default '0',
`server_id` int(11) unsigned NOT NULL default '0',
`tcp_port` varchar(255) default NULL,
`udp_port` varchar(255) default NULL,
`active` varchar(255) NOT NULL default 'y',
`active` enum('n','y') NOT NULL default 'y',
PRIMARY KEY (`firewall_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 ;
) ENGINE=MyISAM AUTO_INCREMENT=1;
-- --------------------------------------------------------
......@@ -247,20 +479,20 @@ CREATE TABLE `firewall` (
--
CREATE TABLE `ftp_user` (
`ftp_user_id` bigint(20) NOT NULL auto_increment,
`sys_userid` int(11) NOT NULL default '0',
`sys_groupid` int(11) NOT NULL default '0',
`ftp_user_id` int(11) unsigned NOT NULL auto_increment,
`sys_userid` int(11) unsigned NOT NULL default '0',
`sys_groupid` int(11) unsigned NOT NULL default '0',
`sys_perm_user` varchar(5) default NULL,
`sys_perm_group` varchar(5) default NULL,
`sys_perm_other` varchar(5) default NULL,
`server_id` int(11) NOT NULL default '0',
`parent_domain_id` int(11) NOT NULL default '0',
`username` varchar(255) default NULL,
`password` varchar(255) default NULL,
`server_id` int(11) unsigned NOT NULL default '0',
`parent_domain_id` int(11) unsigned NOT NULL default '0',
`username` varchar(64) default NULL,
`password` varchar(64) default NULL,
`quota_size` int(11) NOT NULL default '-1',
`active` varchar(255) NOT NULL default 'y',
`uid` varchar(255) default NULL,
`gid` varchar(255) default NULL,
`active` enum('n','y') NOT NULL default 'y',
`uid` varchar(64) default NULL,
`gid` varchar(64) default NULL,
`dir` varchar(255) default NULL,
`quota_files` int(11) NOT NULL default '-1',
`ul_ratio` int(11) NOT NULL default '-1',
......@@ -272,7 +504,7 @@ CREATE TABLE `ftp_user` (
KEY `server_id` (`server_id`),
KEY `username` (`username`),
KEY `quota_files` (`quota_files`)
) ENGINE=MyISAM AUTO_INCREMENT=1 ;
) ENGINE=MyISAM AUTO_INCREMENT=1;
-- --------------------------------------------------------
......@@ -281,9 +513,9 @@ CREATE TABLE `ftp_user` (
--
CREATE TABLE `mail_access` (
`access_id` int(11) NOT NULL auto_increment,
`sys_userid` int(11) NOT NULL default '0',
`sys_groupid` int(11) NOT NULL default '0',
`access_id` int(11) unsigned NOT NULL auto_increment,
`sys_userid` int(11) unsigned NOT NULL default '0',
`sys_groupid` int(11) unsigned NOT NULL default '0',
`sys_perm_user` varchar(5) NOT NULL default '',
`sys_perm_group` varchar(5) NOT NULL default '',
`sys_perm_other` varchar(5) NOT NULL default '',
......@@ -294,7 +526,7 @@ CREATE TABLE `mail_access` (
`active` enum('n','y') NOT NULL default 'y',
PRIMARY KEY (`access_id`),
KEY `server_id` (`server_id`,`source`)
) ENGINE=MyISAM AUTO_INCREMENT=1 ;
) ENGINE=MyISAM AUTO_INCREMENT=1;
-- --------------------------------------------------------
......@@ -303,9 +535,9 @@ CREATE TABLE `mail_access` (
--
CREATE TABLE `mail_content_filter` (
`content_filter_id` bigint(20) NOT NULL auto_increment,
`sys_userid` int(11) NOT NULL default '0',
`sys_groupid` int(11) NOT NULL default '0',
`content_filter_id` int(11) unsigned NOT NULL auto_increment,
`sys_userid` int(11) unsigned NOT NULL default '0',
`sys_groupid` int(11) unsigned NOT NULL default '0',
`sys_perm_user` varchar(5) default NULL,
`sys_perm_group` varchar(5) default NULL,
`sys_perm_other` varchar(5) default NULL,
......@@ -316,7 +548,7 @@ CREATE TABLE `mail_content_filter` (
`action` varchar(255) default NULL,
`active` varchar(255) NOT NULL default 'y',
PRIMARY KEY (`content_filter_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 ;
) ENGINE=MyISAM AUTO_INCREMENT=1;
-- --------------------------------------------------------
......@@ -325,19 +557,19 @@ CREATE TABLE `mail_content_filter` (
--
CREATE TABLE `mail_domain` (
`domain_id` int(11) NOT NULL auto_increment,
`sys_userid` int(11) NOT NULL default '0',
`sys_groupid` int(11) NOT NULL default '0',
`domain_id` int(11) unsigned NOT NULL auto_increment,
`sys_userid` int(11) unsigned NOT NULL default '0',
`sys_groupid` int(11) unsigned NOT NULL default '0',
`sys_perm_user` varchar(5) NOT NULL default '',
`sys_perm_group` varchar(5) NOT NULL default '',
`sys_perm_other` varchar(5) NOT NULL default '',
`server_id` int(11) NOT NULL default '0',
`server_id` int(11) unsigned NOT NULL default '0',
`domain` varchar(255) NOT NULL default '',
`active` enum('y','n') NOT NULL,