diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-11-04 20:23:22 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-11-04 22:56:41 +0300 |
commit | d6b5551bff867250edcdc36455ef32844ee2b935 (patch) | |
tree | 16acaf1c9a81b58ceb21bc4524a087c14f23735f /sql-files/upgrades/2014-01-04--16-47.sql | |
parent | 905dada713af49bb610177c4842685628a1c0a97 (diff) | |
download | serverdata-d6b5551bff867250edcdc36455ef32844ee2b935.tar.gz serverdata-d6b5551bff867250edcdc36455ef32844ee2b935.tar.bz2 serverdata-d6b5551bff867250edcdc36455ef32844ee2b935.tar.xz serverdata-d6b5551bff867250edcdc36455ef32844ee2b935.zip |
convert server data for using with hercules.
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..40be437d9 --- /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); |