More missing config entries added
[mailer.git] / install / tables.sql
index c231e0f4340574a2ec3cd9afec85874fefa8037f..4e08999a3db379192d14c092ad7d22757c7bef98 100644 (file)
-DROP TABLE IF EXISTS `mxchange_admin_menu`;\r
-CREATE TABLE `mxchange_admin_menu` (\r
-  `id` bigint(22) NOT NULL auto_increment,\r
-  `action` varchar(255) NOT NULL default '',\r
-  `what` varchar(255) NOT NULL default '',\r
-  `title` varchar(50) NOT NULL default '',\r
-  `sort` bigint(20) NOT NULL default '0',\r
-  `descr` blob NOT NULL,\r
-  PRIMARY KEY  (`id`)\r
-) TYPE=MyISAM;\r
-\r
-DROP TABLE IF EXISTS `mxchange_admins`;\r
-CREATE TABLE `mxchange_admins` (\r
-  `id` bigint(20) NOT NULL auto_increment,\r
-  `login` varchar(100) NOT NULL default '',\r
-  `password` varchar(40) NOT NULL default '',\r
-  PRIMARY KEY  (`id`)\r
-) TYPE=MyISAM;\r
-\r
-DROP TABLE IF EXISTS `mxchange_cats`;\r
-CREATE TABLE `mxchange_cats` (\r
-  `id` bigint(22) NOT NULL auto_increment,\r
-  `cat` varchar(255) NOT NULL default '',\r
-  `visible` enum('Y','N') NOT NULL default 'Y',\r
-  `sort` bigint(20) NOT NULL default '0',\r
-  PRIMARY KEY  (`id`)\r
-) TYPE=MyISAM;\r
-\r
-DROP TABLE IF EXISTS `mxchange_config`;\r
-CREATE TABLE `mxchange_config` (\r
-  `config` tinyint(1) NOT NULL default '0',\r
-  `pass_len` tinyint(4) NOT NULL default '5',\r
-  `points_register` bigint(20) NOT NULL default '0',\r
-  `points_ref` bigint(20) NOT NULL default '0',\r
-  `least_cats` tinyint(4) NOT NULL default '5',\r
-  `check_double_email` enum('Y','N') NOT NULL default 'Y',\r
-  `check_double_pass` enum('Y','N') NOT NULL default 'N',\r
-  `admin_notify` enum('Y','N') NOT NULL default 'Y',\r
-  `url_tlock` bigint(20) NOT NULL default '86400',\r
-  `test_text` enum('Y','N') NOT NULL default 'Y',\r
-  `max_tlength` bigint(20) NOT NULL default '1000',\r
-  `test_subj` enum('Y','N') NOT NULL default 'Y',\r
-  `autosend_active` enum('Y','N') NOT NULL default 'N',\r
-  PRIMARY KEY  (`config`)\r
-) TYPE=MyISAM;\r
-\r
-INSERT INTO `mxchange_config` VALUES (0,5,2000,200,5,'Y','N','Y',86400,'Y',1000,'Y','N');\r
-\r
-DROP TABLE IF EXISTS `mxchange_guest_menu`;\r
-CREATE TABLE `mxchange_guest_menu` (\r
-  `id` bigint(22) NOT NULL auto_increment,\r
-  `action` varchar(20) NOT NULL default '',\r
-  `what` varchar(20) NOT NULL default '',\r
-  `title` varchar(50) NOT NULL default '',\r
-  `sort` bigint(20) NOT NULL default '0',\r
-  `visible` enum('Y','N') NOT NULL default 'Y',\r
-  `locked` enum('Y','N') NOT NULL default 'Y',\r
-  `counter` bigint(20) NOT NULL default '0',\r
-  PRIMARY KEY  (`id`)\r
-) TYPE=MyISAM;\r
-\r
-DROP TABLE IF EXISTS `mxchange_max_receive`;\r
-CREATE TABLE `mxchange_max_receive` (\r
-  `id` bigint(22) NOT NULL auto_increment,\r
-  `value` mediumint(9) NOT NULL default '0',\r
-  `comment` varchar(255) NOT NULL default '',\r
-  PRIMARY KEY  (`id`)\r
-) TYPE=MyISAM;\r
-\r
-DROP TABLE IF EXISTS `mxchange_member_menu`;\r
-CREATE TABLE `mxchange_member_menu` (\r
-  `id` bigint(22) NOT NULL auto_increment,\r
-  `action` varchar(20) NOT NULL default '',\r
-  `what` varchar(20) NOT NULL default '',\r
-  `title` varchar(50) NOT NULL default '',\r
-  `sort` bigint(20) NOT NULL default '0',\r
-  `visible` enum('Y','N') NOT NULL default 'Y',\r
-  `locked` enum('Y','N') NOT NULL default 'Y',\r
-  `descr` blob NOT NULL,\r
-  `counter` bigint(20) NOT NULL default '0',\r
-  PRIMARY KEY  (`id`)\r
-) TYPE=MyISAM;\r
-\r
-DROP TABLE IF EXISTS `mxchange_mod_reg`;\r
-CREATE TABLE `mxchange_mod_reg` (\r
-  `id` bigint(20) NOT NULL auto_increment,\r
-  `module` varchar(50) NOT NULL default '',\r
-  `locked` enum('Y','N') NOT NULL default 'Y',\r
-  `hidden` enum('Y','N') NOT NULL default 'N',\r
-  `admin_only` enum('Y','N') NOT NULL default 'N',\r
-  `title` varchar(200) NOT NULL default '',\r
-  `mem_only` enum('Y','N') NOT NULL default 'N',\r
-  `clicks` bigint(20) NOT NULL default '0',\r
-  PRIMARY KEY  (`id`)\r
-) TYPE=MyISAM;\r
-\r
-INSERT INTO `mxchange_mod_reg` VALUES (1,'admin','N','N','Y','','N',0);\r
-INSERT INTO `mxchange_mod_reg` VALUES (2,'index','N','N','N','','N',0);\r
-INSERT INTO `mxchange_mod_reg` VALUES (3,'frameset','Y','N','N','','N',0);\r
-INSERT INTO `mxchange_mod_reg` VALUES (4,'login','N','N','N','','Y',0);\r
-INSERT INTO `mxchange_mod_reg` VALUES (6,'frametester','N','Y','N','','N',0);\r
-INSERT INTO `mxchange_mod_reg` VALUES (7,'loader','N','Y','N','','N',0);\r
-INSERT INTO `mxchange_mod_reg` VALUES (8,'order','N','N','N','','N',0);\r
-\r
-DROP TABLE IF EXISTS `mxchange_payments`;\r
-CREATE TABLE `mxchange_payments` (\r
-  `id` bigint(20) NOT NULL auto_increment,\r
-  `time` int(11) NOT NULL default '0',\r
-  `payment` float(5,3) NOT NULL default '0.000',\r
-  `mail_title` varchar(255) NOT NULL default '',\r
-  `price` float(5,3) NOT NULL default '0.000',\r
-  PRIMARY KEY  (`id`)\r
-) TYPE=MyISAM;\r
-\r
-DROP TABLE IF EXISTS `mxchange_pool`;\r
-CREATE TABLE `mxchange_pool` (\r
-  `id` bigint(20) NOT NULL auto_increment,\r
-  `sender` bigint(20) NOT NULL default '0',\r
-  `subject` varchar(200) NOT NULL default '',\r
-  `text` longblob NOT NULL,\r
-  `receivers` longblob NOT NULL,\r
-  `payment_id` tinyint(4) NOT NULL default '0',\r
-  `data_type` enum('TEMP','SEND','NEW','ADMIN') NOT NULL default 'TEMP',\r
-  `timestamp` varchar(10) NOT NULL default '0',\r
-  `url` tinytext NOT NULL,\r
-  `target_send` bigint(20) NOT NULL default '0',\r
-  `cat_id` bigint(20) NOT NULL default '0',\r
-  PRIMARY KEY  (`id`)\r
-) TYPE=MyISAM;\r
-\r
-DROP TABLE IF EXISTS `mxchange_refbanner`;\r
-CREATE TABLE `mxchange_refbanner` (\r
-  `id` bigint(22) NOT NULL auto_increment,\r
-  `url` text NOT NULL,\r
-  `alternate` text NOT NULL,\r
-  `visible` enum('Y','N') NOT NULL default 'Y',\r
-  `counter` bigint(22) NOT NULL default '0',\r
-  PRIMARY KEY  (`id`)\r
-) TYPE=MyISAM;\r
-\r
-DROP TABLE IF EXISTS `mxchange_refdepths`;\r
-CREATE TABLE `mxchange_refdepths` (\r
-  `id` tinyint(4) NOT NULL auto_increment,\r
-  `level` tinyint(4) NOT NULL default '0',\r
-  `percents` tinyint(4) NOT NULL default '0',\r
-  PRIMARY KEY  (`id`)\r
-) TYPE=MyISAM;\r
-\r
-INSERT INTO `mxchange_refdepths` VALUES (1,0,100);\r
-INSERT INTO `mxchange_refdepths` VALUES (2,1,30);\r
-INSERT INTO `mxchange_refdepths` VALUES (3,2,15);\r
-INSERT INTO `mxchange_refdepths` VALUES (4,3,10);\r
-INSERT INTO `mxchange_refdepths` VALUES (5,4,8);\r
-INSERT INTO `mxchange_refdepths` VALUES (6,5,5);\r
-\r
-DROP TABLE IF EXISTS `mxchange_refsystem`;\r
-CREATE TABLE `mxchange_refsystem` (\r
-  `id` bigint(22) NOT NULL auto_increment,\r
-  `userid` bigint(20) NOT NULL default '0',\r
-  `level` tinyint(4) NOT NULL default '0',\r
-  `counter` bigint(20) NOT NULL default '0',\r
-  PRIMARY KEY  (`id`)\r
-) TYPE=MyISAM;\r
-\r
-DROP TABLE IF EXISTS `mxchange_user_cats`;\r
-CREATE TABLE `mxchange_user_cats` (\r
-  `id` bigint(22) NOT NULL auto_increment,\r
-  `userid` bigint(20) NOT NULL default '0',\r
-  `cat_id` tinyint(4) NOT NULL default '0',\r
-  PRIMARY KEY  (`id`)\r
-) TYPE=MyISAM;\r
-\r
-DROP TABLE IF EXISTS `mxchange_user_data`;\r
-CREATE TABLE `mxchange_user_data` (\r
-  `userid` bigint(22) NOT NULL auto_increment,\r
-  `surname` varchar(255) NOT NULL default '',\r
-  `family` varchar(255) NOT NULL default '',\r
-  `street_nr` varchar(255) NOT NULL default '',\r
-  `country` varchar(4) NOT NULL default '',\r
-  `zip` varchar(6) NOT NULL default '',\r
-  `city` varchar(255) NOT NULL default '',\r
-  `email` varchar(255) NOT NULL default '',\r
-  `birth_day` char(2) NOT NULL default '01',\r
-  `birth_month` char(2) NOT NULL default '01',\r
-  `birth_year` varchar(4) NOT NULL default '1970',\r
-  `password` varchar(32) NOT NULL default '',\r
-  `max_mails` int(11) NOT NULL default '0',\r
-  `receive_mails` int(11) NOT NULL default '0',\r
-  `refid` bigint(22) NOT NULL default '0',\r
-  `status` enum('UNCONFIRMED','CONFIRMED','LOCKED') NOT NULL default 'UNCONFIRMED',\r
-  `user_hash` varchar(32) NOT NULL default '',\r
-  `REMOTE_ADDR` varchar(15) NOT NULL default '0.0.0.0',\r
-  `last_online` varchar(10) NOT NULL default '0',\r
-  `last_module` varchar(20) NOT NULL default '',\r
-  `ref_clicks` bigint(20) NOT NULL default '0',\r
-  `total_logins` bigint(20) NOT NULL default '0',\r
-  `sex` enum('M','F') NOT NULL default 'M',\r
-  `used_points` double(22,3) NOT NULL default '0.000',\r
-  `emails_sent` bigint(20) NOT NULL default '0',\r
-  PRIMARY KEY  (`userid`)\r
-) TYPE=MyISAM;\r
-\r
-DROP TABLE IF EXISTS `mxchange_user_points`;\r
-CREATE TABLE `mxchange_user_points` (\r
-  `id` bigint(22) NOT NULL auto_increment,\r
-  `userid` bigint(22) NOT NULL default '0',\r
-  `ref_depth` tinyint(4) NOT NULL default '0',\r
-  `points` double(22,3) NOT NULL default '0.000',\r
-  PRIMARY KEY  (`id`)\r
-) TYPE=MyISAM;\r
-\r
-alter table `mxchange_config` add `max_send` tinyint not null default '100';\r
-alter table `mxchange_config` add `url_blacklist` enum('Y','N') not null default 'Y';\r
-alter table `mxchange_config` add `auto_purge` tinyint not null default '14';\r
-alter table `mxchange_config` add `auto_purge_active` enum('Y','N') not null default 'Y';\r
-\r
-alter table `mxchange_pool` modify `url` tinytext not null;\r
-alter table `mxchange_pool` change `url` `url` tinyblob not null;\r
-alter table `mxchange_pool` modify `data_type` enum('TEMP','SEND','NEW','ADMIN','ACTIVE') not null default 'TEMP';\r
-\r
-DROP TABLE IF EXISTS `mxchange_user_links`;\r
-CREATE TABLE `mxchange_user_links` (\r
-  `id` bigint(20) NOT NULL auto_increment,\r
-  `stats_id` bigint(20) NOT NULL default '0',\r
-  `userid` bigint(20) NOT NULL default '0',\r
-  `link_type` enum('NORMAL') NOT NULL default 'NORMAL',\r
-  PRIMARY KEY  (`id`)\r
-) TYPE=MyISAM;\r
-\r
-DROP TABLE IF EXISTS `mxchange_user_stats`;\r
-CREATE TABLE `mxchange_user_stats` (\r
-  `id` bigint(20) NOT NULL auto_increment,\r
-  `userid` bigint(20) NOT NULL default '0',\r
-  `cat_id` bigint(20) NOT NULL default '0',\r
-  `payment_id` bigint(20) NOT NULL default '0',\r
-  `subject` varchar(200) NOT NULL default '',\r
-  `url` tinyblob NOT NULL,\r
-  `max_rec` bigint(20) NOT NULL default '0',\r
-  `timestamp_ordered` varchar(10) NOT NULL default '',\r
-  `pool_id` bigint(20) NOT NULL default '0',\r
-  `timestamp_sstart` varchar(10) NOT NULL default '',\r
-  `timestamp_send` varchar(10) NOT NULL default '',\r
-  PRIMARY KEY  (`id`)\r
-) TYPE=MyISAM;\r
-\r
-alter table `mxchange_user_data` add `joined` varchar(10) not null default '0';\r
-alter table `mxchange_config` add `last_update` varchar(10) not null default '0';\r
-\r
-UPDATE `mxchange_member_menu` SET locked = 'N' WHERE 'id'='12' OR 'id'='11' LIMIT 1;\r
-\r
-UPDATE `mxchange_guest_menu` SET counter='0';\r
-UPDATE `mxchange_member_menu` SET counter='0';\r
-\r
-INSERT INTO `mxchange_mod_reg` VALUES (NULL,'chk_login','N','N','N','','N',0);\r
-alter table `mxchange_pool` modify `data_type` enum('TEMP','SEND','NEW','ADMIN','ACTIVE') not null default 'TEMP';\r
-alter table `mxchange_config` add `unconfirmed` bigint not null default '100';\r
-alter table `mxchange_config` add `profile_lock` bigint not null default '86400';\r
-alter table `mxchange_user_data` add `last_update` varchar(10) not null default '0';\r
-alter table `mxchange_refbanner` add `clicks` bigint not null default '0';\r
-alter table `mxchange_config` add `online_timeout` bigint not null default '1800';\r
-\r
-alter table `mxchange_config` add `mad_timestamp` varchar(10) not null default '0';\r
-alter table `mxchange_config` add `mad_count` bigint not null;\r
-alter table `mxchange_config` add `profile_update` bigint not null default '15768000';\r
-alter table `mxchange_config` add `send_prof_update` enum('Y','N') not null default 'Y';\r
-alter table `mxchange_config` add `resend_profile_update` bigint not null default '172800';\r
-\r
-alter table `mxchange_user_data` add `last_profile_sent` varchar(10) not null default '0';\r
-alter table `mxchange_user_data` add `notified` enum('Y','N') not null default 'N';\r
-\r
-alter table `mxchange_config` add `patch_level` varchar(100) not null default '78';\r
-alter table `mxchange_config` add `patch_ctime` varchar(10) not null default '0';\r
-\r
-alter table `mxchange_admins` add `email` varchar(255) not null;\r
-\r
-DROP TABLE IF EXISTS `mxchange_task_system`;\r
-CREATE TABLE mxchange_task_system (\r
-  id bigint(20) NOT NULL auto_increment,\r
-  assigned_admin bigint(20) NOT NULL default '0',\r
-  userid bigint(20) NOT NULL default '0',\r
-  status enum('NEW','OPEN','SOLVED','CLOSED','DELETED') NOT NULL default 'NEW',\r
-  task_type enum('FIRST_USER','SUPPORT_MEMBER','SUPPORT_ADMIN','OTHERS', 'EXTENSION', 'EXTENSION_UPDATE') NOT NULL default 'FIRST_USER',\r
-  subject varchar(255) NOT NULL default '',\r
-  text longblob NOT NULL,\r
-  task_created varchar(10) NOT NULL default '0',\r
-  KEY (assigned_admin),\r
-  PRIMARY KEY  (id)\r
-) TYPE=MyISAM;\r
-\r
-ALTER TABLE `mxchange_pool` ADD INDEX (sender);\r
-ALTER TABLE `mxchange_pool` ADD INDEX (payment_id);\r
-ALTER TABLE `mxchange_pool` ADD INDEX (cat_id);\r
-ALTER TABLE `mxchange_refsystem` ADD INDEX (userid);\r
-ALTER TABLE `mxchange_task_system` ADD INDEX (assigned_admin);\r
-ALTER TABLE `mxchange_task_system` ADD INDEX (userid);\r
-ALTER TABLE `mxchange_user_cats` ADD INDEX (userid);\r
-ALTER TABLE `mxchange_user_cats` ADD INDEX (cat_id);\r
-ALTER TABLE `mxchange_user_data` ADD INDEX (refid);\r
-ALTER TABLE `mxchange_user_links` ADD INDEX (userid);\r
-ALTER TABLE `mxchange_user_links` ADD INDEX (stats_id);\r
-ALTER TABLE `mxchange_user_points` ADD INDEX (userid);\r
-ALTER TABLE `mxchange_user_stats` ADD INDEX (userid);\r
-ALTER TABLE `mxchange_user_stats` ADD INDEX (cat_id);\r
-ALTER TABLE `mxchange_user_stats` ADD INDEX (payment_id);\r
-ALTER TABLE `mxchange_user_stats` ADD INDEX (pool_id);\r
-\r
-alter table `mxchange_user_stats` add `clicks` bigint not null;\r
-alter table `mxchange_config` add `code_length` tinyint not null default '5';\r
-alter table `mxchange_config` add `guest_stats` enum('MEMBERS','MODULES','INACTIVE') not null default 'MEMBERS';\r
-alter table `mxchange_config` add `ref_payout` tinyint not null default '5';\r
-alter table `mxchange_user_data` add `ref_payout` tinyint not null default '0';\r
-alter table `mxchange_user_points` add `locked_points` bigint not null default '0';\r
-\r
-DROP TABLE IF EXISTS mxchange_extensions;\r
-CREATE TABLE mxchange_extensions (\r
-  id bigint(20) NOT NULL auto_increment,\r
-  ext_name varchar(255) NOT NULL default '',\r
-  ext_lang_file varchar(255) NOT NULL default '',\r
-  ext_active enum('Y','N') NOT NULL default 'N',\r
-  ext_version varchar(255) NOT NULL default '0.',\r
-  PRIMARY KEY  (id)\r
-) TYPE=MyISAM;\r
-\r
-DROP TABLE IF EXISTS `mxchange_jackpot`;\r
-CREATE TABLE `mxchange_jackpot` (\r
-  `ok` char(2) NOT NULL default 'ok',\r
-  `points` double(23,3) NOT NULL default '0.000',\r
-  PRIMARY KEY  (`ok`)\r
-) TYPE=MyISAM;\r
-\r
-alter table `mxchange_config` add `activate_xchange` bigint(20) not null default '100';\r
-alter table `mxchange_config` add `order_multi_page` enum('Y','N') not null default 'Y';\r
-alter table `mxchange_config` add `display_refid` enum('Y','N') not null default 'Y';\r
-alter table `mxchange_config` add `ip_timeout` bigint(20) not null default '86400';\r
-alter table `mxchange_pool` add `zip` varchar(6) not null default '';\r
-\r
-alter table `mxchange_task_system` change `task_type` `task_type` varchar(255)  not null default 'FIRST_USER';\r
-alter table `mxchange_user_data` modify `zip` varchar(6) not null default '';\r
-alter table `mxchange_admin_menu` modify `action` varchar(255) not null default '';\r
-alter table `mxchange_admin_menu` modify `what` varchar(255) not null default '';\r
-alter table `mxchange_user_data` modify `last_module` varchar(255) not null default '';\r
-alter table `mxchange_config` add `allow_direct_pay` enum('N', 'Y') not null default 'N';\r
-alter table `mxchange_user_data` modify `last_profile_sent` varchar(10)  not null default '0';\r
-alter table `mxchange_user_data` modify `last_update` varchar(10)  not null default '0';\r
-alter table `mxchange_user_data` modify `joined` varchar(10)  not null default '0';\r
-alter table `mxchange_user_data` modify `last_online` varchar(10)  not null default '0';\r
-update `mxchange_user_data` SET last_profile_sent='0' WHERE last_profile_sent='0000000000';\r
-update `mxchange_user_data` SET last_update='0' WHERE last_update='0000000000';\r
-update `mxchange_user_data` SET joined='0' WHERE joined='0000000000';\r
-update `mxchange_user_data` SET last_online='0' WHERE last_online='0000000000';\r
+DROP TABLE IF EXISTS `{!prefix!}_admin_menu`;
+CREATE TABLE `{!prefix!}_admin_menu` (
+  `id` BIGINT(22) NOT NULL AUTO_INCREMENT,
+  `action` VARCHAR(255) NOT NULL DEFAULT '',
+  `what` VARCHAR(255) NULL DEFAULT NULL,
+  `title` VARCHAR(50) NOT NULL DEFAULT '',
+  `sort` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+  `descr` TEXT NOT NULL,
+  PRIMARY KEY  (`id`)
+) TYPE={!type!};
+
+DROP TABLE IF EXISTS `{!prefix!}_admins`;
+CREATE TABLE `{!prefix!}_admins` (
+  `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+  `login` VARCHAR(100) NOT NULL DEFAULT '',
+  `password` VARCHAR(40) NOT NULL DEFAULT '',
+  PRIMARY KEY  (`id`)
+) TYPE={!type!};
+
+DROP TABLE IF EXISTS `{!prefix!}_cats`;
+CREATE TABLE `{!prefix!}_cats` (
+  `id` BIGINT(22) NOT NULL AUTO_INCREMENT,
+  `cat` VARCHAR(255) NOT NULL DEFAULT '',
+  `visible` ENUM('Y','N') NOT NULL DEFAULT 'Y',
+  `sort` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+  PRIMARY KEY  (`id`)
+) TYPE={!type!};
+
+DROP TABLE IF EXISTS `{!prefix!}_config`;
+CREATE TABLE `{!prefix!}_config` (
+  `config` tinyint(1) NOT NULL DEFAULT 0,
+  `pass_len` TINYINT(3) UNSIGNED NOT NULL DEFAULT 5,
+  `points_register` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+  `points_ref` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+  `least_cats` TINYINT(3) UNSIGNED NOT NULL DEFAULT 5,
+  `check_double_email` ENUM('Y','N') NOT NULL DEFAULT 'Y',
+  `check_double_pass` ENUM('Y','N') NOT NULL DEFAULT 'N',
+  `admin_notify` ENUM('Y','N') NOT NULL DEFAULT 'Y',
+  `url_tlock` BIGINT(20) UNSIGNED NOT NULL DEFAULT '86400',
+  `test_text` ENUM('Y','N') NOT NULL DEFAULT 'Y',
+  `max_tlength` BIGINT(20) UNSIGNED NOT NULL DEFAULT '1000',
+  `test_subj` ENUM('Y','N') NOT NULL DEFAULT 'Y',
+  `autosend_active` ENUM('Y','N') NOT NULL DEFAULT 'N',
+  PRIMARY KEY  (`config`)
+) TYPE={!type!};
+
+INSERT INTO `{!prefix!}_config` VALUES (0,5,2000,200,5,'Y','N','Y',86400,'Y',1000,'Y','N');
+
+DROP TABLE IF EXISTS `{!prefix!}_guest_menu`;
+CREATE TABLE `{!prefix!}_guest_menu` (
+  `id` BIGINT(22) NOT NULL AUTO_INCREMENT,
+  `action` VARCHAR(255) NOT NULL DEFAULT '',
+  `what` VARCHAR(255) NULL DEFAULT NULL,
+  `title` VARCHAR(50) NOT NULL DEFAULT '',
+  `sort` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+  `visible` ENUM('Y','N') NOT NULL DEFAULT 'Y',
+  `locked` ENUM('Y','N') NOT NULL DEFAULT 'Y',
+  `counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+  PRIMARY KEY  (`id`)
+) TYPE={!type!};
+
+DROP TABLE IF EXISTS `{!prefix!}_max_receive`;
+CREATE TABLE `{!prefix!}_max_receive` (
+  `id` BIGINT(22) NOT NULL AUTO_INCREMENT,
+  `value` MEDIUMINT(9) NOT NULL DEFAULT 0,
+  `comment` VARCHAR(255) NOT NULL DEFAULT '',
+  PRIMARY KEY  (`id`)
+) TYPE={!type!};
+
+DROP TABLE IF EXISTS `{!prefix!}_member_menu`;
+CREATE TABLE `{!prefix!}_member_menu` (
+  `id` BIGINT(22) NOT NULL AUTO_INCREMENT,
+  `action` VARCHAR(255) NOT NULL DEFAULT '',
+  `what` VARCHAR(255) NULL DEFAULT NULL,
+  `title` VARCHAR(50) NOT NULL DEFAULT '',
+  `sort` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+  `visible` ENUM('Y','N') NOT NULL DEFAULT 'Y',
+  `locked` ENUM('Y','N') NOT NULL DEFAULT 'Y',
+  `counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+  PRIMARY KEY  (`id`)
+) TYPE={!type!};
+
+DROP TABLE IF EXISTS `{!prefix!}_mod_reg`;
+CREATE TABLE `{!prefix!}_mod_reg` (
+  `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+  `module` VARCHAR(50) NOT NULL DEFAULT '',
+  `locked` ENUM('Y','N') NOT NULL DEFAULT 'Y',
+  `hidden` ENUM('Y','N') NOT NULL DEFAULT 'N',
+  `admin_only` ENUM('Y','N') NOT NULL DEFAULT 'N',
+  `title` VARCHAR(200) NOT NULL DEFAULT '',
+  `mem_only` ENUM('Y','N') NOT NULL DEFAULT 'N',
+  `clicks` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+  PRIMARY KEY  (`id`)
+) TYPE={!type!};
+
+INSERT INTO `{!prefix!}_mod_reg` VALUES (1,'admin','N','N','Y','','N',0);
+INSERT INTO `{!prefix!}_mod_reg` VALUES (2,'index','N','N','N','','N',0);
+INSERT INTO `{!prefix!}_mod_reg` VALUES (3,'css','N','N','N','','Y',0);
+INSERT INTO `{!prefix!}_mod_reg` VALUES (4,'login','N','N','N','','Y',0);
+INSERT INTO `{!prefix!}_mod_reg` VALUES (5,'js','N','N','N','','Y',0);
+INSERT INTO `{!prefix!}_mod_reg` VALUES (6,'frametester','N','Y','N','','N',0);
+INSERT INTO `{!prefix!}_mod_reg` VALUES (7,'loader','N','Y','N','','N',0);
+INSERT INTO `{!prefix!}_mod_reg` VALUES (8,'confirm','N','N','N','','N',0);
+INSERT INTO `{!prefix!}_mod_reg` VALUES (9,'chk_login','N','N','N','','N',0);
+
+DROP TABLE IF EXISTS `{!prefix!}_payments`;
+CREATE TABLE `{!prefix!}_payments` (
+  `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+  `time` INT(7) NOT NULL DEFAULT 0,
+  `payment` FLOAT(5,3) UNSIGNED NOT NULL DEFAULT '0.000',
+  `mail_title` VARCHAR(255) NOT NULL DEFAULT '',
+  `price` FLOAT(5,5) UNSIGNED NOT NULL DEFAULT '0.00000',
+  PRIMARY KEY  (`id`)
+) TYPE={!type!};
+
+DROP TABLE IF EXISTS `{!prefix!}_pool`;
+CREATE TABLE `{!prefix!}_pool` (
+  `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+  `sender` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+  `subject` VARCHAR(200) NOT NULL DEFAULT '',
+  `text` LONGTEXT NOT NULL,
+  `receivers` LONGTEXT NOT NULL,
+  `payment_id` TINYINT(3) UNSIGNED NOT NULL DEFAULT 0,
+  `data_type` ENUM('TEMP','SEND','NEW','ADMIN') NOT NULL DEFAULT 'TEMP',
+  `timestamp` VARCHAR(10) NOT NULL DEFAULT 0,
+  `url` TINYTEXT NOT NULL,
+  `target_send` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+  `cat_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+  PRIMARY KEY  (`id`)
+) TYPE={!type!};
+
+DROP TABLE IF EXISTS `{!prefix!}_refbanner`;
+CREATE TABLE `{!prefix!}_refbanner` (
+  `id` BIGINT(22) NOT NULL AUTO_INCREMENT,
+  `url` TEXT NOT NULL,
+  `alternate` TEXT NOT NULL,
+  `visible` ENUM('Y','N') NOT NULL DEFAULT 'Y',
+  `counter` BIGINT(22) NOT NULL DEFAULT 0,
+  PRIMARY KEY  (`id`)
+) TYPE={!type!};
+
+DROP TABLE IF EXISTS `{!prefix!}_refdepths`;
+CREATE TABLE `{!prefix!}_refdepths` (
+  `id` TINYINT(3) UNSIGNED NOT NULL AUTO_INCREMENT,
+  `level` TINYINT(3) UNSIGNED NOT NULL DEFAULT 0,
+  `percents` TINYINT(3) UNSIGNED NOT NULL DEFAULT 0,
+  PRIMARY KEY  (`id`)
+) TYPE={!type!};
+
+INSERT INTO `{!prefix!}_refdepths` VALUES (1,0,100);
+INSERT INTO `{!prefix!}_refdepths` VALUES (2,1,30);
+INSERT INTO `{!prefix!}_refdepths` VALUES (3,2,15);
+INSERT INTO `{!prefix!}_refdepths` VALUES (4,3,10);
+INSERT INTO `{!prefix!}_refdepths` VALUES (5,4,8);
+INSERT INTO `{!prefix!}_refdepths` VALUES (6,5,5);
+
+DROP TABLE IF EXISTS `{!prefix!}_refsystem`;
+CREATE TABLE `{!prefix!}_refsystem` (
+  `id` BIGINT(22) NOT NULL AUTO_INCREMENT,
+  `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+  `level` TINYINT(3) UNSIGNED NOT NULL DEFAULT 0,
+  `counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+  PRIMARY KEY  (`id`)
+) TYPE={!type!};
+
+ALTER TABLE `{!prefix!}_config` ADD `max_send` TINYINT(3) UNSIGNED NOT NULL DEFAULT '100';
+ALTER TABLE `{!prefix!}_config` ADD `url_blacklist` ENUM('Y','N') NOT NULL DEFAULT 'Y';
+ALTER TABLE `{!prefix!}_config` ADD `auto_purge` TINYINT(3) UNSIGNED NOT NULL DEFAULT '14';
+ALTER TABLE `{!prefix!}_config` ADD `auto_purge_active` ENUM('Y','N') NOT NULL DEFAULT 'Y';
+
+ALTER TABLE `{!prefix!}_pool` MODIFY `url` TINYTEXT NOT NULL;
+ALTER TABLE `{!prefix!}_pool` CHANGE `url` `url` TINYTEXT NOT NULL;
+ALTER TABLE `{!prefix!}_pool` MODIFY `data_type` ENUM('TEMP','SEND','NEW','ADMIN','ACTIVE') NOT NULL DEFAULT 'TEMP';
+
+ALTER TABLE `{!prefix!}_config` ADD `last_update` VARCHAR(10) NOT NULL DEFAULT 0;
+
+INSERT INTO `{!prefix!}_mod_reg` VALUES (NULL,'chk_login','N','N','N','','N',0);
+ALTER TABLE `{!prefix!}_pool` MODIFY `data_type` ENUM('TEMP','SEND','NEW','ADMIN','ACTIVE') NOT NULL DEFAULT 'TEMP';
+ALTER TABLE `{!prefix!}_config` ADD `unconfirmed` BIGINT(20) UNSIGNED NOT NULL DEFAULT '100';
+ALTER TABLE `{!prefix!}_config` ADD `profile_lock` BIGINT(20) UNSIGNED NOT NULL DEFAULT '86400';
+ALTER TABLE `{!prefix!}_refbanner` ADD `clicks` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0;
+ALTER TABLE `{!prefix!}_config` ADD `online_timeout` BIGINT(20) UNSIGNED NOT NULL DEFAULT '1800';
+
+ALTER TABLE `{!prefix!}_config` ADD `mad_timestamp` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0;
+ALTER TABLE `{!prefix!}_config` ADD `mad_count` BIGINT(20) UNSIGNED NOT NULL;
+ALTER TABLE `{!prefix!}_config` ADD `profile_update` BIGINT(20) UNSIGNED NOT NULL DEFAULT '15768000';
+ALTER TABLE `{!prefix!}_config` ADD `send_prof_update` ENUM('Y','N') NOT NULL DEFAULT 'Y';
+ALTER TABLE `{!prefix!}_config` ADD `resend_profile_update` BIGINT(20) UNSIGNED NOT NULL DEFAULT '172800';
+
+ALTER TABLE `{!prefix!}_config` ADD `patch_level` VARCHAR(100) NOT NULL DEFAULT '78';
+ALTER TABLE `{!prefix!}_config` ADD `patch_ctime` VARCHAR(10) NOT NULL DEFAULT 0;
+
+ALTER TABLE `{!prefix!}_admins` ADD `email` VARCHAR(255) NOT NULL;
+
+DROP TABLE IF EXISTS `{!prefix!}_task_system`;
+CREATE TABLE `{!prefix!}_task_system` (
+  `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+  `assigned_admin` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+  `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+  `status` ENUM('NEW','OPEN','SOLVED','CLOSED','DELETED') NOT NULL DEFAULT 'NEW',
+  `task_type` ENUM('FIRST_USER','SUPPORT_MEMBER','SUPPORT_ADMIN','OTHERS','EXTENSION','EXTENSION_UPDATE') NOT NULL DEFAULT 'FIRST_USER',
+  `subject` VARCHAR(255) NOT NULL DEFAULT '',
+  `text` LONGTEXT NOT NULL,
+  `task_created` VARCHAR(10) NOT NULL DEFAULT 0,
+  KEY (`assigned_admin`),
+  PRIMARY KEY  (`id`)
+) TYPE={!type!};
+
+ALTER TABLE `{!prefix!}_pool` ADD INDEX (`sender`);
+ALTER TABLE `{!prefix!}_pool` ADD INDEX (`payment_id`);
+ALTER TABLE `{!prefix!}_pool` ADD INDEX (`cat_id`);
+ALTER TABLE `{!prefix!}_refsystem` ADD INDEX (`userid`);
+ALTER TABLE `{!prefix!}_task_system` ADD INDEX (`assigned_admin`);
+ALTER TABLE `{!prefix!}_task_system` ADD INDEX (`userid`);
+
+ALTER TABLE `{!prefix!}_config` ADD `code_length` TINYINT(3) UNSIGNED NOT NULL DEFAULT 5;
+ALTER TABLE `{!prefix!}_config` ADD `guest_stats` ENUM('MEMBERS','MODULES','INACTIVE') NOT NULL DEFAULT 'MEMBERS';
+ALTER TABLE `{!prefix!}_config` ADD `ref_payout` TINYINT(3) UNSIGNED NOT NULL DEFAULT 5;
+
+DROP TABLE IF EXISTS `{!prefix!}_extensions`;
+CREATE TABLE `{!prefix!}_extensions` (
+  `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+  `ext_name` VARCHAR(255) NOT NULL DEFAULT '',
+  `ext_active` ENUM('Y','N') NOT NULL DEFAULT 'N',
+  `ext_version` VARCHAR(255) NOT NULL DEFAULT 'INVALID',
+  PRIMARY KEY  (`id`)
+) TYPE={!type!};
+
+DROP TABLE IF EXISTS `{!prefix!}_jackpot`;
+CREATE TABLE `{!prefix!}_jackpot` (
+  `ok` CHAR(2) NOT NULL DEFAULT 'ok',
+  `points` FLOAT(20,3) NOT NULL DEFAULT '0.000',
+  PRIMARY KEY  (`ok`)
+) TYPE={!type!};
+
+ALTER TABLE `{!prefix!}_config` ADD `activate_xchange` BIGINT(20) UNSIGNED NOT NULL DEFAULT 100;
+ALTER TABLE `{!prefix!}_config` ADD `order_multi_page` ENUM('Y','N') NOT NULL DEFAULT 'Y';
+ALTER TABLE `{!prefix!}_config` ADD `display_refid` ENUM('Y','N') NOT NULL DEFAULT 'Y';
+ALTER TABLE `{!prefix!}_config` ADD `ip_timeout` BIGINT(20) UNSIGNED NOT NULL DEFAULT 86400;
+ALTER TABLE `{!prefix!}_pool` ADD `zip` VARCHAR(6) NOT NULL DEFAULT '';
+
+ALTER TABLE `{!prefix!}_task_system` CHANGE `task_type` `task_type` VARCHAR(255)  NOT NULL DEFAULT 'FIRST_USER';
+ALTER TABLE `{!prefix!}_config` ADD `allow_direct_pay` ENUM('Y','N') NOT NULL DEFAULT 'N';