diff options
author | shennetsind <ind@henn.et> | 2014-01-11 14:02:59 -0200 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2014-01-11 14:02:59 -0200 |
commit | 82b583b5ef4e729ad2c3c74b26adce16a145605a (patch) | |
tree | 5bb20b90edd899b06abe9853dba06383a9379c06 /sql-files/upgrades/2014-01-04--16-47.sql | |
parent | 56649bda4b2f62cf42847830546b5856234b3178 (diff) | |
download | hercules-82b583b5ef4e729ad2c3c74b26adce16a145605a.tar.gz hercules-82b583b5ef4e729ad2c3c74b26adce16a145605a.tar.bz2 hercules-82b583b5ef4e729ad2c3c74b26adce16a145605a.tar.xz hercules-82b583b5ef4e729ad2c3c74b26adce16a145605a.zip |
Hercules 1st 2014 MegaPatch
http://hercules.ws/board/topic/3886-hercules-1st-2014-megapatch/
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'sql-files/upgrades/2014-01-04--16-47.sql')
-rw-r--r-- | sql-files/upgrades/2014-01-04--16-47.sql | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/sql-files/upgrades/2014-01-04--16-47.sql b/sql-files/upgrades/2014-01-04--16-47.sql new file mode 100644 index 000000000..a60ec1d24 --- /dev/null +++ b/sql-files/upgrades/2014-01-04--16-47.sql @@ -0,0 +1,61 @@ +#1388854043 +ALTER TABLE `mapreg` ADD PRIMARY KEY (`varname`, `index`); +ALTER TABLE `mapreg` DROP INDEX `varname`; +ALTER TABLE `mapreg` DROP INDEX `index`; +ALTER TABLE `mapreg` MODIFY `varname` varchar(32) BINARY NOT NULL; +CREATE TABLE IF NOT EXISTS `acc_reg_num_db` ( + `account_id` int(11) unsigned NOT NULL default '0', + `key` varchar(32) BINARY NOT NULL default '', + `index` int(11) unsigned NOT NULL default '0', + `value` int(11) NOT NULL default '0', + PRIMARY KEY (`account_id`,`key`,`index`), + KEY `account_id` (`account_id`) +) ENGINE=MyISAM; +CREATE TABLE IF NOT EXISTS `acc_reg_str_db` ( + `account_id` int(11) unsigned NOT NULL default '0', + `key` varchar(32) BINARY NOT NULL default '', + `index` int(11) unsigned NOT NULL default '0', + `value` varchar(254) NOT NULL default '0', + PRIMARY KEY (`account_id`,`key`,`index`), + KEY `account_id` (`account_id`) +) ENGINE=MyISAM; +CREATE TABLE IF NOT EXISTS `char_reg_num_db` ( + `char_id` int(11) unsigned NOT NULL default '0', + `key` varchar(32) BINARY NOT NULL default '', + `index` int(11) unsigned NOT NULL default '0', + `value` int(11) NOT NULL default '0', + PRIMARY KEY (`char_id`,`key`,`index`), + KEY `char_id` (`char_id`) +) ENGINE=MyISAM; +CREATE TABLE IF NOT EXISTS `char_reg_str_db` ( + `char_id` int(11) unsigned NOT NULL default '0', + `key` varchar(32) BINARY NOT NULL default '', + `index` int(11) unsigned NOT NULL default '0', + `value` varchar(254) NOT NULL default '0', + PRIMARY KEY (`char_id`,`key`,`index`), + KEY `char_id` (`char_id`) +) ENGINE=MyISAM; +CREATE TABLE IF NOT EXISTS `global_acc_reg_num_db` ( + `account_id` int(11) unsigned NOT NULL default '0', + `key` varchar(32) BINARY NOT NULL default '', + `index` int(11) unsigned NOT NULL default '0', + `value` int(11) NOT NULL default '0', + PRIMARY KEY (`account_id`,`key`,`index`), + KEY `account_id` (`account_id`) +) ENGINE=MyISAM; +CREATE TABLE IF NOT EXISTS `global_acc_reg_str_db` ( + `account_id` int(11) unsigned NOT NULL default '0', + `key` varchar(32) BINARY NOT NULL default '', + `index` int(11) unsigned NOT NULL default '0', + `value` varchar(254) NOT NULL default '0', + PRIMARY KEY (`account_id`,`key`,`index`), + KEY `account_id` (`account_id`) +) ENGINE=MyISAM; +INSERT INTO `acc_reg_num_db` (`account_id`, `key`, `index`, `value`) SELECT `account_id`, `str`, 0, `value` FROM `global_reg_value` WHERE `type` = 2 AND `str` NOT LIKE '%$'; +INSERT INTO `acc_reg_str_db` (`account_id`, `key`, `index`, `value`) SELECT `account_id`, `str`, 0, `value` FROM `global_reg_value` WHERE `type` = 2 AND `str` LIKE '%$'; +INSERT INTO `char_reg_num_db` (`char_id`, `key`, `index`, `value`) SELECT `char_id`, `str`, 0, `value` FROM `global_reg_value` WHERE `type` = 3 AND `str` NOT LIKE '%$'; +INSERT INTO `char_reg_str_db` (`char_id`, `key`, `index`, `value`) SELECT `char_id`, `str`, 0, `value` FROM `global_reg_value` WHERE `type` = 3 AND `str` LIKE '%$'; +INSERT INTO `global_acc_reg_num_db` (`account_id`, `key`, `index`, `value`) SELECT `account_id`, `str`, 0, `value` FROM `global_reg_value` WHERE `type` = 1 AND `str` NOT LIKE '%$'; +INSERT INTO `global_acc_reg_str_db` (`account_id`, `key`, `index`, `value`) SELECT `account_id`, `str`, 0, `value` FROM `global_reg_value` WHERE `type` = 1 AND `str` LIKE '%$'; +#DROP TABLE `global_reg_value`; +INSERT INTO `sql_updates` (`timestamp`) VALUES (1388854043);
\ No newline at end of file |