Commit 32f943f2 authored by latham's avatar latham
Browse files

Clean up install SQL and make order. Please review.

parent f9c7f3f9
/*
Copyright (c) 2007-2010, Till Brehm, projektfarm Gmbh
Copyright (c) 2007-2011, Till Brehm, projektfarm Gmbh
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
......@@ -27,6 +26,20 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-- Includes
--
-- iso_country_list.sql
--
-- This will create and then populate a MySQL table with a list of the names and
-- ISO 3166 codes for countries in existence as of the date below.
--
-- For updates to this file, see http://27.org/isocountrylist/
-- For more about ISO 3166, see http://www.iso.ch/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1.html
--
-- Created by getisocountrylist.pl on Sun Nov 2 14:59:20 2003.
-- Wm. Rhodes <iso_country_list@27.org>
--
--
-- ISPConfig 3
-- DB-Version: 3.0.0.9
......@@ -40,82 +53,95 @@ SET FOREIGN_KEY_CHECKS = 0;
-- --------------------------------------------------------
-- --------------------------------------------------------
--
-- Table structure for table `client`
--
--
-- Table structure for table `attempts_login`
--
CREATE TABLE `attempts_login` (
`ip` varchar(39) NOT NULL,
`times` int(11) DEFAULT NULL,
`login_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;
-- --------------------------------------------------------
--
-- Table structure for table `client`
--
CREATE TABLE `client` (
`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(64) default NULL,
`contact_name` varchar(64) default NULL,
`customer_no` varchar(64) default NULL,
`vat_id` varchar(64) default NULL,
`street` 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,
`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(64) DEFAULT NULL,
`company_id` varchar(30) DEFAULT NULL,
`contact_name` varchar(64) DEFAULT NULL,
`customer_no` varchar(64) DEFAULT NULL,
`vat_id` varchar(64) DEFAULT NULL,
`street` 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(16) default NULL,
`icq` varchar(16) DEFAULT NULL,
`notes` text,
`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',
`limit_mailaliasdomain` int(11) NOT NULL default '-1',
`limit_mailforward` int(11) NOT NULL default '-1',
`limit_mailcatchall` int(11) NOT NULL default '-1',
`limit_mailrouting` int(11) NOT NULL default '0',
`limit_mailfilter` int(11) NOT NULL default '-1',
`limit_fetchmail` int(11) NOT NULL default '-1',
`limit_mailquota` int(11) NOT NULL default '-1',
`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) unsigned 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',
`limit_mailaliasdomain` int(11) NOT NULL DEFAULT '-1',
`limit_mailforward` int(11) NOT NULL DEFAULT '-1',
`limit_mailcatchall` int(11) NOT NULL DEFAULT '-1',
`limit_mailrouting` int(11) NOT NULL DEFAULT '0',
`limit_mailfilter` int(11) NOT NULL DEFAULT '-1',
`limit_fetchmail` int(11) NOT NULL DEFAULT '-1',
`limit_mailquota` int(11) NOT NULL DEFAULT '-1',
`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) unsigned NOT NULL DEFAULT '1',
`limit_web_ip` text,
`limit_web_domain` int(11) NOT NULL default '-1',
`limit_web_quota` int(11) NOT NULL default '-1',
`web_php_options` varchar(255) NOT NULL default 'no,fast-cgi,cgi,mod,suphp',
`limit_web_subdomain` int(11) NOT NULL default '-1',
`limit_web_aliasdomain` int(11) NOT NULL default '-1',
`limit_ftp_user` int(11) NOT NULL default '-1',
`limit_shell_user` int(11) NOT NULL default '0',
`limit_web_domain` int(11) NOT NULL DEFAULT '-1',
`limit_web_quota` int(11) NOT NULL DEFAULT '-1',
`web_php_options` varchar(255) NOT NULL DEFAULT 'no,fast-cgi,cgi,mod,suphp',
`limit_web_subdomain` int(11) NOT NULL DEFAULT '-1',
`limit_web_aliasdomain` int(11) NOT NULL DEFAULT '-1',
`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',
`limit_webdav_user` int(11) NOT NULL default '0',
`default_dnsserver` int(11) unsigned NOT NULL default '1',
`limit_dns_zone` int(11) NOT NULL default '-1',
`limit_dns_slave_zone` int(11) NOT NULL default '-1',
`limit_dns_record` int(11) NOT NULL default '-1',
`default_dbserver` int(11) NOT NULL default '1',
`limit_database` int(11) NOT NULL default '-1',
`limit_cron` int(11) NOT NULL default '0',
`limit_cron_type` enum('url','chrooted','full') NOT NULL default 'url',
`limit_cron_frequency` int(11) NOT NULL default '5',
`limit_traffic_quota` int(11) NOT NULL default '-1',
`limit_client` int(11) NOT NULL default '0',
`limit_mailmailinglist` int(11) NOT NULL default '-1',
`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 '',
`limit_webdav_user` int(11) NOT NULL DEFAULT '0',
`default_dnsserver` int(11) unsigned NOT NULL DEFAULT '1',
`limit_dns_zone` int(11) NOT NULL DEFAULT '-1',
`limit_dns_slave_zone` int(11) NOT NULL DEFAULT '-1',
`limit_dns_record` int(11) NOT NULL DEFAULT '-1',
`default_dbserver` int(11) NOT NULL DEFAULT '1',
`limit_database` int(11) NOT NULL DEFAULT '-1',
`limit_cron` int(11) NOT NULL DEFAULT '0',
`limit_cron_type` enum('url','chrooted','full') NOT NULL DEFAULT 'url',
`limit_cron_frequency` int(11) NOT NULL DEFAULT '5',
`limit_traffic_quota` int(11) NOT NULL DEFAULT '-1',
`limit_client` int(11) NOT NULL DEFAULT '0',
`limit_mailmailinglist` int(11) NOT NULL DEFAULT '-1',
`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` bigint(20) DEFAULT NULL,
`id_rsa` VARCHAR( 2000 ) NOT NULL default '',
`ssh_rsa` VARCHAR( 600 ) NOT NULL default '',
PRIMARY KEY (`client_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1;
`id_rsa` varchar(2000) NOT NULL DEFAULT '',
`ssh_rsa` varchar(600) NOT NULL DEFAULT '',
PRIMARY KEY (`client_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
......@@ -164,8 +190,22 @@ CREATE TABLE `client_template` (
`limit_client` int(11) NOT NULL default '0',
`limit_mailmailinglist` int(11) NOT NULL default '-1',
PRIMARY KEY (`template_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1;
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `country`
--
CREATE TABLE `country` (
`iso` char(2) NOT NULL,
`name` varchar(64) NOT NULL,
`printable_name` varchar(64) NOT NULL,
`iso3` char(3) DEFAULT NULL,
`numcode` smallint(6) DEFAULT NULL,
PRIMARY KEY (`iso`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;
-- --------------------------------------------------------
......@@ -190,8 +230,7 @@ CREATE TABLE `cron` (
`run_wday` varchar(100) NULL,
`active` enum('n','y') NOT NULL default 'y',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1;
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
......@@ -218,15 +257,15 @@ CREATE TABLE `dns_rr` (
`serial` int(10) unsigned default NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `rr` (`zone`,`name`,`type`,`data`)
) ENGINE=MyISAM AUTO_INCREMENT=1;
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `dns_soa`
--
--
-- Table structure for table `dns_slave`
--
CREATE TABLE `dns_soa` (
CREATE TABLE `dns_slave` (
`id` int(10) unsigned NOT NULL auto_increment,
`sys_userid` int(11) unsigned NOT NULL,
`sys_groupid` int(11) unsigned NOT NULL,
......@@ -236,29 +275,20 @@ CREATE TABLE `dns_soa` (
`server_id` int(11) NOT NULL default '1',
`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,
`also_notify` varchar(255) default NULL,
`update_acl` varchar(255) default NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `origin` (`origin`),
KEY `active` (`active`)
) ENGINE=MyISAM AUTO_INCREMENT=1;
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `dns_slave`
--
--
-- Table structure for table `dns_soa`
--
CREATE TABLE `dns_slave` (
CREATE TABLE `dns_soa` (
`id` int(10) unsigned NOT NULL auto_increment,
`sys_userid` int(11) unsigned NOT NULL,
`sys_groupid` int(11) unsigned NOT NULL,
......@@ -268,12 +298,21 @@ CREATE TABLE `dns_slave` (
`server_id` int(11) NOT NULL default '1',
`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,
`also_notify` varchar(255) default NULL,
`update_acl` varchar(255) default NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `origin` (`origin`),
KEY `active` (`active`)
) ENGINE=MyISAM AUTO_INCREMENT=1;
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
......@@ -293,10 +332,10 @@ CREATE TABLE `dns_template` (
`template` text,
`visible` enum('N','Y') NOT NULL default 'Y',
PRIMARY KEY (`template_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1;
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
--
-- Tabellenstruktur für Tabelle `domain`
-- Table structure for table `domain`
--
CREATE TABLE `domain` (
......@@ -309,7 +348,7 @@ CREATE TABLE `domain` (
`domain` varchar(255) NOT NULL default '',
PRIMARY KEY (`domain_id`),
UNIQUE KEY `domain` (`domain`)
) ENGINE=MyISAM;
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;
-- --------------------------------------------------------
......@@ -329,7 +368,67 @@ CREATE TABLE `firewall` (
`udp_port` varchar(255) default NULL,
`active` enum('n','y') NOT NULL default 'y',
PRIMARY KEY (`firewall_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1;
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `firewall_filter`
--
CREATE TABLE `firewall_filter` (
`firewall_id` int(11) unsigned NOT NULL auto_increment,
`sys_userid` int(11) unsigned NOT NULL default '0',
`domain_id` int(11) NOT NULL,
`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) unsigned NOT NULL default '0',
`rule_name` varchar(100) default NULL,
`rule_id` int(11) default 1,
`src_ip` varchar(20) NOT NULL,
`src_netmask` varchar(20) NOT NULL,
`dst_ip` varchar(20) NOT NULL,
`dst_netmask` varchar(20) NOT NULL,
`src_from_port` varchar(10) NOT NULL,
`src_to_port` varchar(10) NOT NULL,
`dst_to_port` varchar(10) NOT NULL,
`dst_from_port` varchar(10) NOT NULL,
`protocol` varchar(10) default 'tcp',
`inbound_policy` enum('allow','deny','reject','limit') default 'allow',
`outbound_policy` enum('allow','deny','reject','limit') default 'allow',
`active` enum('n','y') NOT NULL default 'y',
`client_id` int(11) NOT NULL,
PRIMARY KEY (`firewall_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `firewall_forward`
--
CREATE TABLE `firewall_forward` (
`firewall_id` int(11) unsigned NOT NULL auto_increment,
`sys_userid` int(11) unsigned NOT NULL default '0',
`domain_id` int(11) NOT NULL,
`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) unsigned NOT NULL default '0',
`application_name` varchar(100) default NULL,
`dst_ip` varchar(20) NOT NULL,
`src_from_port` varchar(10) NOT NULL,
`src_to_port` varchar(10) NOT NULL,
`dst_to_port` varchar(10) NOT NULL,
`dst_from_port` varchar(10) NOT NULL,
`protocol` int(3) default 0,
`active` enum('n','y') NOT NULL default 'y',
`client_id` int(11) NOT NULL,
PRIMARY KEY (`firewall_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
......@@ -363,7 +462,45 @@ CREATE TABLE `ftp_user` (
KEY `server_id` (`server_id`),
KEY `username` (`username`),
KEY `quota_files` (`quota_files`)
) ENGINE=MyISAM AUTO_INCREMENT=1;
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `help_faq`
--
CREATE TABLE `help_faq` (
`hf_id` int(11) NOT NULL AUTO_INCREMENT,
`hf_section` int(11) DEFAULT NULL,
`hf_order` int(11) DEFAULT '0',
`hf_question` text,
`hf_answer` text,
`sys_userid` int(11) DEFAULT NULL,
`sys_groupid` int(11) DEFAULT NULL,
`sys_perm_user` varchar(5) DEFAULT NULL,
`sys_perm_group` varchar(5) DEFAULT NULL,
`sys_perm_other` varchar(5) DEFAULT NULL,
PRIMARY KEY (`hf_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `help_faq_sections`
--
CREATE TABLE `help_faq_sections` (
`hfs_id` int(11) NOT NULL AUTO_INCREMENT,
`hfs_name` varchar(255) DEFAULT NULL,
`hfs_order` int(11) DEFAULT '0',
`sys_userid` int(11) DEFAULT NULL,
`sys_groupid` int(11) DEFAULT NULL,
`sys_perm_user` varchar(5) DEFAULT NULL,
`sys_perm_group` varchar(5) DEFAULT NULL,
`sys_perm_other` varchar(5) DEFAULT NULL,
PRIMARY KEY (`hfs_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
......@@ -385,7 +522,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 DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
......@@ -407,7 +544,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 DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
......@@ -428,7 +565,7 @@ CREATE TABLE `mail_domain` (
PRIMARY KEY (`domain_id`),
KEY `server_id` (`server_id`,`domain`),
KEY `domain_active` (`domain`,`active`)
) ENGINE=MyISAM AUTO_INCREMENT=1;
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
......@@ -451,7 +588,7 @@ CREATE TABLE `mail_forwarding` (
PRIMARY KEY (`forwarding_id`),
KEY `server_id` (`server_id`,`source`),
KEY `type` (`type`)
) ENGINE=MyISAM AUTO_INCREMENT=1;
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
......@@ -475,7 +612,7 @@ CREATE TABLE `mail_get` (
`destination` varchar(255) default NULL,
`active` varchar(255) NOT NULL default 'y',
PRIMARY KEY (`mailget_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1;
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
......@@ -492,7 +629,7 @@ CREATE TABLE `mail_greylist` (
`origin_type` enum('MANUAL','AUTO') NOT NULL default 'AUTO',
`create_time` datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (`greylist_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1;
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
......@@ -513,7 +650,7 @@ CREATE TABLE `mail_mailinglist` (
`email` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
PRIMARY KEY (`mailinglist_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1;
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
......@@ -533,8 +670,7 @@ CREATE TABLE IF NOT EXISTS `mail_relay_recipient` (
`access` varchar(255) NOT NULL DEFAULT 'OK',
`active` varchar(255) NOT NULL DEFAULT 'y',
PRIMARY KEY (`relay_recipient_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 ;
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
......@@ -549,7 +685,7 @@ CREATE TABLE `mail_traffic` (
`traffic` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`traffic_id`),
KEY `mailuser_id` (`mailuser_id`,`month`)
) ENGINE=MyISAM AUTO_INCREMENT=1;
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
......@@ -572,7 +708,7 @@ CREATE TABLE `mail_transport` (
PRIMARY KEY (`transport_id`),
KEY `server_id` (`server_id`,`transport`),
KEY `server_id_2` (`server_id`,`domain`)
) ENGINE=MyISAM AUTO_INCREMENT=1;
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
......@@ -613,7 +749,7 @@ CREATE TABLE `mail_user` (
PRIMARY KEY (`mailuser_id`),
KEY `server_id` (`server_id`,`email`),
KEY `email_access` (`email`,`access`)
) ENGINE=MyISAM AUTO_INCREMENT=1;
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
......@@ -637,7 +773,42 @@ CREATE TABLE `mail_user_filter` (
`target` varchar(255) default NULL,
`active` enum('n','y') NOT NULL default 'y',
PRIMARY KEY (`filter_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1;
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `monitor_data`
--
CREATE TABLE `monitor_data` (
`server_id` int(11) unsigned NOT NULL,
`type` varchar(255) NOT NULL,
`created` int(11) unsigned NOT NULL,
`data` mediumtext NOT NULL,
`state` enum('no_state','unknown','ok','info','warning','critical','error') NOT NULL DEFAULT 'unknown',
PRIMARY KEY (`server_id`,`type`,`created`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;
-- --------------------------------------------------------
--
-- Table structure for table `proxy_reverse`
--
CREATE TABLE `proxy_reverse` (
`rewrite_id` int(11) 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) unsigned NOT NULL DEFAULT '0',
`rewrite_url_src` varchar(100) NOT NULL,
`rewrite_url_dst` varchar(100) NOT NULL,
`active` enum('n','y') NOT NULL DEFAULT 'y',
PRIMARY KEY (`rewrite_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
......@@ -651,7 +822,7 @@ CREATE TABLE `remote_session` (
`remote_functions` text NOT NULL,
`tstamp` int(10) unsigned NOT NULL,
PRIMARY KEY (`remote_session`)
) ENGINE=MyISAM;
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;
-- --------------------------------------------------------
......@@ -670,7 +841,7 @@ CREATE TABLE `remote_user` (
`remote_password` varchar(64) NOT NULL,
`remote_functions` text NOT NULL,
PRIMARY KEY (`remote_userid`)
) ENGINE=MyISAM AUTO_INCREMENT=1;
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
......@@ -700,7 +871,7 @@ CREATE TABLE `server` (
`dbversion` int(11) unsigned NOT NULL default '1',
`active` tinyint(1) NOT NULL default '1',
PRIMARY KEY (`server_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1;
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
......@@ -719,10 +890,14 @@ CREATE TABLE `server_ip` (
`ip_address` varchar(39) default NULL,