- Major change in menu system. You need to rewrite/update your member and guest
[mailer.git] / install / tables.sql
index cbcca3921bc2e4d83cb12e31cf30eb248befc42a..dd1a805a2386b3ff2081a09e631432072ced3925 100644 (file)
@@ -4,14 +4,14 @@ CREATE TABLE `mxchange_admin_menu` (
   `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
+  `sort` BIGINT(20) UNSIGNED 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
+  `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,\r
   `login` VARCHAR(100) NOT NULL DEFAULT '',\r
   `password` VARCHAR(40) NOT NULL DEFAULT '',\r
   PRIMARY KEY  (`id`)\r
@@ -22,23 +22,23 @@ CREATE TABLE `mxchange_cats` (
   `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
+  `sort` BIGINT(20) UNSIGNED 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(3) 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(3) NOT NULL DEFAULT '5',\r
+  `config` tinyint(1) NOT NULL DEFAULT 0,\r
+  `pass_len` TINYINT(3) UNSIGNED NOT NULL DEFAULT 5,\r
+  `points_register` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\r
+  `points_ref` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\r
+  `least_cats` TINYINT(3) UNSIGNED 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
+  `url_tlock` BIGINT(20) UNSIGNED NOT NULL DEFAULT '86400',\r
   `test_text` ENUM('Y','N') NOT NULL DEFAULT 'Y',\r
-  `max_tlength` BIGINT(20) NOT NULL DEFAULT '1000',\r
+  `max_tlength` BIGINT(20) UNSIGNED 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
@@ -52,17 +52,17 @@ CREATE TABLE `mxchange_guest_menu` (
   `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
+  `sort` BIGINT(20) UNSIGNED 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
+  `counter` BIGINT(20) UNSIGNED 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
+  `value` MEDIUMINT(9) NOT NULL DEFAULT 0,\r
   `comment` VARCHAR(255) NOT NULL DEFAULT '',\r
   PRIMARY KEY  (`id`)\r
 ) TYPE=MyISAM;\r
@@ -73,24 +73,24 @@ CREATE TABLE `mxchange_member_menu` (
   `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
+  `sort` BIGINT(20) UNSIGNED 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
+  `counter` BIGINT(20) UNSIGNED 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
+  `id` BIGINT(20) UNSIGNED 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
+  `clicks` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\r
   PRIMARY KEY  (`id`)\r
 ) TYPE=MyISAM;\r
 \r
@@ -104,27 +104,27 @@ INSERT INTO `mxchange_mod_reg` VALUES (8,'order','N','N','N','','N',0);
 \r
 DROP TABLE IF EXISTS `mxchange_payments`;\r
 CREATE TABLE `mxchange_payments` (\r
-  `id` BIGINT(20) NOT NULL AUTO_INCREMENT,\r
-  `time` INT(7) NOT NULL DEFAULT '0',\r
-  `payment` FLOAT(5,3) NOT NULL DEFAULT '0.000',\r
+  `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,\r
+  `time` INT(7) NOT NULL DEFAULT 0,\r
+  `payment` FLOAT(5,3) UNSIGNED NOT NULL DEFAULT '0.000',\r
   `mail_title` VARCHAR(255) NOT NULL DEFAULT '',\r
-  `price` FLOAT(5,3) NOT NULL DEFAULT '0.000',\r
+  `price` FLOAT(5,5) UNSIGNED NOT NULL DEFAULT '0.00000',\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
+  `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,\r
+  `sender` BIGINT(20) UNSIGNED 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(3) NOT NULL DEFAULT '0',\r
+  `payment_id` TINYINT(3) UNSIGNED 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
+  `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
+  `target_send` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\r
+  `cat_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\r
   PRIMARY KEY  (`id`)\r
 ) TYPE=MyISAM;\r
 \r
@@ -134,15 +134,15 @@ CREATE TABLE `mxchange_refbanner` (
   `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
+  `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(3) NOT NULL AUTO_INCREMENT,\r
-  `level` TINYINT(3) NOT NULL DEFAULT '0',\r
-  `percents` TINYINT(3) NOT NULL DEFAULT '0',\r
+  `id` TINYINT(3) UNSIGNED NOT NULL AUTO_INCREMENT,\r
+  `level` TINYINT(3) UNSIGNED NOT NULL DEFAULT 0,\r
+  `percents` TINYINT(3) UNSIGNED NOT NULL DEFAULT 0,\r
   PRIMARY KEY  (`id`)\r
 ) TYPE=MyISAM;\r
 \r
@@ -156,17 +156,17 @@ INSERT INTO `mxchange_refdepths` VALUES (6,5,5);
 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(3) NOT NULL DEFAULT '0',\r
-  `counter` BIGINT(20) NOT NULL DEFAULT '0',\r
+  `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\r
+  `level` TINYINT(3) UNSIGNED NOT NULL DEFAULT 0,\r
+  `counter` BIGINT(20) UNSIGNED 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(3) NOT NULL DEFAULT '0',\r
+  `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\r
+  `cat_id` TINYINT(3) UNSIGNED NOT NULL DEFAULT 0,\r
   PRIMARY KEY  (`id`)\r
 ) TYPE=MyISAM;\r
 \r
@@ -184,67 +184,67 @@ CREATE TABLE `mxchange_user_data` (
   `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(7) NOT NULL DEFAULT '0',\r
-  `receive_mails` INT(7) NOT NULL DEFAULT '0',\r
-  `refid` BIGINT(22) NOT NULL DEFAULT '0',\r
+  `max_mails` INT(7) NOT NULL DEFAULT 0,\r
+  `receive_mails` INT(7) 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_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
+  `ref_clicks` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\r
+  `total_logins` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\r
   `gender` 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
+  `emails_sent` BIGINT(20) UNSIGNED 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(3) NOT NULL DEFAULT '0',\r
+  `userid` BIGINT(22) NOT NULL DEFAULT 0,\r
+  `ref_depth` TINYINT(3) UNSIGNED 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(3) 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(3) NOT NULL DEFAULT '14';\r
-alter table `mxchange_config` add `auto_purge_active` ENUM('Y','N') NOT NULL DEFAULT 'Y';\r
+ALTER TABLE `mxchange_config` ADD `max_send` TINYINT(3) UNSIGNED 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(3) UNSIGNED 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
+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
+  `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,\r
+  `stats_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\r
+  `userid` BIGINT(20) UNSIGNED 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
+  `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,\r
+  `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\r
+  `cat_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\r
+  `payment_id` BIGINT(20) UNSIGNED 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
+  `max_rec` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\r
   `timestamp_ordered` VARCHAR(10) NOT NULL DEFAULT '',\r
-  `pool_id` BIGINT(20) NOT NULL DEFAULT '0',\r
+  `pool_id` BIGINT(20) UNSIGNED 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
+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
@@ -252,37 +252,37 @@ UPDATE `mxchange_guest_menu` SET `counter`=0;
 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(20) NOT NULL DEFAULT '100';\r
-alter table `mxchange_config` add `profile_lock` BIGINT(20) 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(20) NOT NULL DEFAULT '0';\r
-alter table `mxchange_config` add `online_timeout` BIGINT(20) NOT NULL DEFAULT '1800';\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(20) UNSIGNED NOT NULL DEFAULT '100';\r
+ALTER TABLE `mxchange_config` ADD `profile_lock` BIGINT(20) UNSIGNED 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(20) UNSIGNED NOT NULL DEFAULT 0;\r
+ALTER TABLE `mxchange_config` ADD `online_timeout` BIGINT(20) UNSIGNED 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(20) NOT NULL;\r
-alter table `mxchange_config` add `profile_update` BIGINT(20) 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(20) NOT NULL DEFAULT '172800';\r
+ALTER TABLE `mxchange_config` ADD `mad_timestamp` VARCHAR(10) NOT NULL DEFAULT 0;\r
+ALTER TABLE `mxchange_config` ADD `mad_count` BIGINT(20) UNSIGNED NOT NULL;\r
+ALTER TABLE `mxchange_config` ADD `profile_update` BIGINT(20) UNSIGNED 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(20) UNSIGNED 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
+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
+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
+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
+  `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,\r
+  `assigned_admin` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,\r
+  `userid` BIGINT(20) UNSIGNED 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
+  `task_created` VARCHAR(10) NOT NULL DEFAULT 0,\r
   KEY (`assigned_admin`),\r
   PRIMARY KEY  (`id`)\r
 ) TYPE=MyISAM;\r
@@ -304,20 +304,20 @@ ALTER TABLE `mxchange_user_stats` ADD INDEX (`cat_id`);
 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(20) NOT NULL;\r
-alter table `mxchange_config` add `code_length` TINYINT(3) 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(3) NOT NULL DEFAULT '5';\r
-alter table `mxchange_user_data` add `ref_payout` TINYINT(3) NOT NULL DEFAULT '0';\r
-alter table `mxchange_user_points` add `locked_points` BIGINT(20) NOT NULL DEFAULT '0';\r
+ALTER TABLE `mxchange_user_stats` ADD `clicks` BIGINT(20) UNSIGNED NOT NULL;\r
+ALTER TABLE `mxchange_config` ADD `code_length` TINYINT(3) UNSIGNED 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(3) UNSIGNED NOT NULL DEFAULT 5;\r
+ALTER TABLE `mxchange_user_data` ADD `ref_payout` TINYINT(3) UNSIGNED NOT NULL DEFAULT 0;\r
+ALTER TABLE `mxchange_user_points` ADD `locked_points` BIGINT(20) UNSIGNED 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
+  `id` BIGINT(20) UNSIGNED 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
+  `ext_version` VARCHAR(255) NOT NULL DEFAULT 'INVALID',\r
   PRIMARY KEY  (`id`)\r
 ) TYPE=MyISAM;\r
 \r
@@ -328,19 +328,19 @@ CREATE TABLE `mxchange_jackpot` (
   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
+ALTER TABLE `mxchange_config` ADD `activate_xchange` BIGINT(20) UNSIGNED 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) UNSIGNED 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