diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-10-05 11:34:32 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2019-01-23 19:48:26 +0300 |
commit | b4a9ffe973b61995c81f2031a42c325d6790cd71 (patch) | |
tree | a3eee2d269206a4699c1821388217ae86e07f6bf /sql-files/upgrades | |
parent | f313c660d91110d119953e1a861b4011721c377b (diff) | |
download | hercules-b4a9ffe973b61995c81f2031a42c325d6790cd71.tar.gz hercules-b4a9ffe973b61995c81f2031a42c325d6790cd71.tar.bz2 hercules-b4a9ffe973b61995c81f2031a42c325d6790cd71.tar.xz hercules-b4a9ffe973b61995c81f2031a42c325d6790cd71.zip |
Remove conf dir.
Diffstat (limited to 'sql-files/upgrades')
59 files changed, 0 insertions, 2340 deletions
diff --git a/sql-files/upgrades/2013-02-14--16-15.sql b/sql-files/upgrades/2013-02-14--16-15.sql deleted file mode 100644 index 38b17c2ba..000000000 --- a/sql-files/upgrades/2013-02-14--16-15.sql +++ /dev/null @@ -1,26 +0,0 @@ -#1360858500 - --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2013-2015 Hercules Dev Team --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - -CREATE TABLE IF NOT EXISTS `sql_updates` ( - `timestamp` INT(11) UNSIGNED NOT NULL, - `ignored` ENUM('Yes','No') NOT NULL DEFAULT 'No' -) ENGINE=MyISAM; -ALTER TABLE `skill` ADD COLUMN `flag` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0; -INSERT INTO `sql_updates` (`timestamp`) VALUES (1360858500); diff --git a/sql-files/upgrades/2013-02-15--18-06.sql b/sql-files/upgrades/2013-02-15--18-06.sql deleted file mode 100644 index fc0fe58ff..000000000 --- a/sql-files/upgrades/2013-02-15--18-06.sql +++ /dev/null @@ -1,22 +0,0 @@ -#1360951560 - --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2013-2015 Hercules Dev Team --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - -ALTER TABLE `sql_updates` ADD PRIMARY KEY (`timestamp`); -INSERT INTO `sql_updates` (`timestamp`) VALUES (1360951560); diff --git a/sql-files/upgrades/2013-03-05--01-05.sql b/sql-files/upgrades/2013-03-05--01-05.sql deleted file mode 100644 index d1f94e40e..000000000 --- a/sql-files/upgrades/2013-03-05--01-05.sql +++ /dev/null @@ -1,22 +0,0 @@ -#1362445531 - --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2013-2015 Hercules Dev Team --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - -ALTER TABLE `login` ADD `character_slots` TINYINT(3) UNSIGNED NOT NULL; -INSERT INTO `sql_updates` (`timestamp`) VALUES (1362445531); diff --git a/sql-files/upgrades/2013-03-06--00-00.sql b/sql-files/upgrades/2013-03-06--00-00.sql deleted file mode 100644 index 8f14b3b01..000000000 --- a/sql-files/upgrades/2013-03-06--00-00.sql +++ /dev/null @@ -1,29 +0,0 @@ -#1362528000 - --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2013-2015 Hercules Dev Team --- Copyright (C) Athena Dev Teams --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - --- This script resets all dewata quests that were done by your users before this revision --- Author: Euphy -DELETE FROM `quest` WHERE `quest_id` > 5034 AND `quest_id` < 5055; -DELETE FROM `quest` WHERE `quest_id` > 9154 AND `quest_id` < 9166; -DELETE FROM `global_reg_value` WHERE `str` = 'dewata_gatti'; -DELETE FROM `global_reg_value` WHERE `str` = 'dewata_legend'; -DELETE FROM `global_reg_value` WHERE `str` = 'dewata_oldman'; -INSERT INTO `sql_updates` (`timestamp`) VALUES (1362528000); diff --git a/sql-files/upgrades/2013-03-09--01-56.sql b/sql-files/upgrades/2013-03-09--01-56.sql deleted file mode 100644 index 587fdb0d4..000000000 --- a/sql-files/upgrades/2013-03-09--01-56.sql +++ /dev/null @@ -1,23 +0,0 @@ -#1362794218 - --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2013-2015 Hercules Dev Team --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - -ALTER TABLE `login` ADD COLUMN `pincode` VARCHAR(4) NOT NULL DEFAULT ''; -ALTER TABLE `login` ADD COLUMN `pincode_change` INT(11) unsigned NOT NULL DEFAULT '0'; -INSERT INTO `sql_updates` (`timestamp`) VALUES (1362794218); diff --git a/sql-files/upgrades/2013-03-27--18-35.sql b/sql-files/upgrades/2013-03-27--18-35.sql deleted file mode 100644 index ddf8a975a..000000000 --- a/sql-files/upgrades/2013-03-27--18-35.sql +++ /dev/null @@ -1,22 +0,0 @@ -#1364409316 - --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2013-2015 Hercules Dev Team --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - -ALTER TABLE `char` ADD COLUMN `slotchange` SMALLINT(3) unsigned NOT NULL default '0'; -INSERT INTO `sql_updates` (`timestamp`) VALUES (1364409316); diff --git a/sql-files/upgrades/2013-04-16--01-24.sql b/sql-files/upgrades/2013-04-16--01-24.sql deleted file mode 100644 index 35a08e585..000000000 --- a/sql-files/upgrades/2013-04-16--01-24.sql +++ /dev/null @@ -1,22 +0,0 @@ -#1366075474 - --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2013-2015 Hercules Dev Team --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - --- Info http://herc.ws/board/topic/410-skill-script-command-updatefix/ -UPDATE `skill` SET `flag` = 0 WHERE `flag` = 4 AND `id` != 2535 AND `id` != 681; diff --git a/sql-files/upgrades/2013-04-16--02-15.sql b/sql-files/upgrades/2013-04-16--02-15.sql deleted file mode 100644 index d8081f7d8..000000000 --- a/sql-files/upgrades/2013-04-16--02-15.sql +++ /dev/null @@ -1,23 +0,0 @@ -#1366078541 - --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2013-2015 Hercules Dev Team --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - -ALTER TABLE `char` ADD `char_opt` INT(11) UNSIGNED NOT NULL DEFAULT '0'; -INSERT INTO `sql_updates` (`timestamp`) VALUES (1366075474); -- for the previous that missed it.. -INSERT INTO `sql_updates` (`timestamp`) VALUES (1366078541); diff --git a/sql-files/upgrades/2013-10-09--21-38.sql b/sql-files/upgrades/2013-10-09--21-38.sql deleted file mode 100644 index 454569665..000000000 --- a/sql-files/upgrades/2013-10-09--21-38.sql +++ /dev/null @@ -1,22 +0,0 @@ -#1381354728 - --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2013-2015 Hercules Dev Team --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - -ALTER TABLE `zenylog` MODIFY `type` ENUM('T','V','P','M','S','N','D','C','A','E','I','B','K') NOT NULL DEFAULT 'S'; -INSERT INTO `sql_updates` (`timestamp`) VALUES (1381354728); diff --git a/sql-files/upgrades/2013-10-10--16-36.sql b/sql-files/upgrades/2013-10-10--16-36.sql deleted file mode 100644 index 18dd92ec8..000000000 --- a/sql-files/upgrades/2013-10-10--16-36.sql +++ /dev/null @@ -1,26 +0,0 @@ -#1381423003 - --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2013-2015 Hercules Dev Team --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - -CREATE TABLE IF NOT EXISTS `account_data` ( - `account_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', - `bank_vault` INT(11) UNSIGNED NOT NULL DEFAULT '0', - PRIMARY KEY (`account_id`) -) ENGINE=MyISAM; -INSERT INTO `sql_updates` (`timestamp`) VALUES (1381423003); diff --git a/sql-files/upgrades/2013-10-27--16-47.sql b/sql-files/upgrades/2013-10-27--16-47.sql deleted file mode 100644 index 5e52140a1..000000000 --- a/sql-files/upgrades/2013-10-27--16-47.sql +++ /dev/null @@ -1,25 +0,0 @@ -#1382892428 - --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2013-2015 Hercules Dev Team --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - -ALTER TABLE `inventory` MODIFY `equip` INT(11) UNSIGNED NOT NULL DEFAULT '0'; -ALTER TABLE `storage` MODIFY `equip` INT(11) UNSIGNED NOT NULL DEFAULT '0'; -ALTER TABLE `cart_inventory` MODIFY `equip` INT(11) UNSIGNED NOT NULL DEFAULT '0'; -ALTER TABLE `guild_storage` MODIFY `equip` INT(11) UNSIGNED NOT NULL DEFAULT '0'; -INSERT INTO `sql_updates` (`timestamp`) VALUES (1382892428); diff --git a/sql-files/upgrades/2013-10-30--19-53.sql b/sql-files/upgrades/2013-10-30--19-53.sql deleted file mode 100644 index 768328c7d..000000000 --- a/sql-files/upgrades/2013-10-30--19-53.sql +++ /dev/null @@ -1,24 +0,0 @@ -#1383162785 - --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2013-2015 Hercules Dev Team --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - -ALTER TABLE `account_data` ADD `base_exp` TINYINT(4) UNSIGNED NOT NULL DEFAULT '100'; -ALTER TABLE `account_data` ADD `base_drop` TINYINT(4) UNSIGNED NOT NULL DEFAULT '100'; -ALTER TABLE `account_data` ADD `base_death` TINYINT(4) UNSIGNED NOT NULL DEFAULT '100'; -INSERT INTO `sql_updates` (`timestamp`) VALUES (1383162785); diff --git a/sql-files/upgrades/2013-10-30--21-12.sql b/sql-files/upgrades/2013-10-30--21-12.sql deleted file mode 100644 index a60004767..000000000 --- a/sql-files/upgrades/2013-10-30--21-12.sql +++ /dev/null @@ -1,22 +0,0 @@ -#1383167577 - --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2013-2015 Hercules Dev Team --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - -ALTER TABLE `char` ADD `font` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0'; -INSERT INTO `sql_updates` (`timestamp`) VALUES (1383167577); diff --git a/sql-files/upgrades/2013-10-31--07-49.sql b/sql-files/upgrades/2013-10-31--07-49.sql deleted file mode 100644 index e32370b41..000000000 --- a/sql-files/upgrades/2013-10-31--07-49.sql +++ /dev/null @@ -1,25 +0,0 @@ -#1383205740 - --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2013-2015 Hercules Dev Team --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - -ALTER TABLE `inventory` ADD COLUMN `bound` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0' AFTER `favorite`; -ALTER TABLE `cart_inventory` ADD COLUMN `bound` TINYINT(1) UNSIGNED NOT NULL default '0' AFTER `expire_time`; -ALTER TABLE `storage` ADD COLUMN `bound` TINYINT(1) UNSIGNED NOT NULL default '0' AFTER `expire_time`; -ALTER TABLE `guild_storage` ADD COLUMN `bound` TINYINT(1) UNSIGNED NOT NULL default '0' AFTER `expire_time`; -INSERT INTO `sql_updates` (`timestamp`) VALUES (1383205740); diff --git a/sql-files/upgrades/2013-11-09--00-03.sql b/sql-files/upgrades/2013-11-09--00-03.sql deleted file mode 100644 index 62a1e2541..000000000 --- a/sql-files/upgrades/2013-11-09--00-03.sql +++ /dev/null @@ -1,24 +0,0 @@ -#1383955424 - --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2013-2015 Hercules Dev Team --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - -ALTER TABLE `account_data` MODIFY `base_exp` TINYINT(4) UNSIGNED NOT NULL DEFAULT '100'; -ALTER TABLE `account_data` MODIFY `base_drop` TINYINT(4) UNSIGNED NOT NULL DEFAULT '100'; -ALTER TABLE `account_data` MODIFY `base_death` TINYINT(4) UNSIGNED NOT NULL DEFAULT '100'; -INSERT INTO `sql_updates` (`timestamp`) VALUES (1383955424); diff --git a/sql-files/upgrades/2013-11-15--00-06.sql b/sql-files/upgrades/2013-11-15--00-06.sql deleted file mode 100644 index 62f278b7f..000000000 --- a/sql-files/upgrades/2013-11-15--00-06.sql +++ /dev/null @@ -1,125 +0,0 @@ -#1384473995 - - --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2013-2015 Hercules Dev Team --- Copyright (C) 2013 Haru <haru@dotalux.com> --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - --- Note: If you're running a MySQL version earlier than 5.0 (or if this scripts fails for you for any reason) --- you'll need to run the following queries manually: --- --- [ Pre-Renewal only ] --- ALTER TABLE item_db2 ADD COLUMN `matk` SMALLINT(5) UNSIGNED DEFAULT NULL AFTER atk; --- ALTER TABLE item_db2 CHANGE COLUMN `equip_level` `equip_level_min` SMALLINT(5) UNSIGNED DEFAULT NULL; --- ALTER TABLE item_db2 ADD COLUMN `equip_level_max` SMALLINT(5) UNSIGNED DEFAULT NULL AFTER equip_level_min; --- [ Both Pre-Renewal and Renewal ] --- ALTER TABLE item_db2 MODIFY COLUMN `price_buy` MEDIUMINT(10) DEFAULT NULL; --- ALTER TABLE item_db2 MODIFY COLUMN `price_sell` MEDIUMINT(10) DEFAULT NULL; --- ALTER TABLE item_db2 MODIFY COLUMN `weight` SMALLINT(5) UNSIGNED DEFAULT NULL; --- ALTER TABLE item_db2 MODIFY COLUMN `atk` SMALLINT(5) UNSIGNED DEFAULT NULL; --- ALTER TABLE item_db2 MODIFY COLUMN `matk` SMALLINT(5) UNSIGNED DEFAULT NULL; --- ALTER TABLE item_db2 MODIFY COLUMN `defence` SMALLINT(5) UNSIGNED DEFAULT NULL; --- ALTER TABLE item_db2 MODIFY COLUMN `range` TINYINT(2) UNSIGNED DEFAULT NULL; --- ALTER TABLE item_db2 MODIFY COLUMN `slots` TINYINT(2) UNSIGNED DEFAULT NULL; --- ALTER TABLE item_db2 MODIFY COLUMN `equip_jobs` INT(12) UNSIGNED DEFAULT NULL; --- ALTER TABLE item_db2 MODIFY COLUMN `equip_upper` TINYINT(8) UNSIGNED DEFAULT NULL; --- ALTER TABLE item_db2 MODIFY COLUMN `equip_genders` TINYINT(2) UNSIGNED DEFAULT NULL; --- ALTER TABLE item_db2 MODIFY COLUMN `equip_locations` SMALLINT(4) UNSIGNED DEFAULT NULL; --- ALTER TABLE item_db2 MODIFY COLUMN `weapon_level` TINYINT(2) UNSIGNED DEFAULT NULL; --- ALTER TABLE item_db2 MODIFY COLUMN `equip_level_min` SMALLINT(5) UNSIGNED DEFAULT NULL; --- ALTER TABLE item_db2 MODIFY COLUMN `equip_level_max` SMALLINT(5) UNSIGNED DEFAULT NULL; --- ALTER TABLE item_db2 MODIFY COLUMN `refineable` TINYINT(1) UNSIGNED DEFAULT NULL; --- ALTER TABLE item_db2 MODIFY COLUMN `view` SMALLINT(3) UNSIGNED DEFAULT NULL; --- INSERT INTO `sql_updates` (`timestamp`) VALUES (1384473995); --- --- [ End ] --- What follows is the automated script that does all of the above. - -DELIMITER $$ - -DROP PROCEDURE IF EXISTS alter_if_not_exists $$ -DROP PROCEDURE IF EXISTS alter_if_exists $$ - -CREATE PROCEDURE alter_if_not_exists(my_table TINYTEXT, my_column TINYTEXT, my_command TINYTEXT, my_predicate TEXT) -BEGIN - set @dbname = DATABASE(); - IF EXISTS ( - SELECT * FROM information_schema.TABLES - WHERE TABLE_SCHEMA = @dbname - AND TABLE_NAME = my_table - ) AND NOT EXISTS ( - SELECT * FROM information_schema.COLUMNS - WHERE TABLE_SCHEMA = @dbname - AND TABLE_NAME = my_table - AND COLUMN_NAME = my_column - ) - THEN - SET @q = CONCAT('ALTER TABLE ', @dbname, '.', my_table, ' ', - my_command, ' `', my_column, '` ', my_predicate); - PREPARE STMT FROM @q; - EXECUTE STMT; - END IF; - -END $$ - -CREATE PROCEDURE alter_if_exists(my_table TINYTEXT, my_column TINYTEXT, my_command TINYTEXT, my_predicate TEXT) -BEGIN - set @dbname = DATABASE(); - IF EXISTS ( - SELECT * FROM information_schema.COLUMNS - WHERE TABLE_SCHEMA = @dbname - AND TABLE_NAME = my_table - AND COLUMN_NAME = my_column - ) - THEN - SET @q = CONCAT('ALTER TABLE ', @dbname, '.', my_table, ' ', - my_command, ' `', my_column, '` ', my_predicate); - PREPARE STMT FROM @q; - EXECUTE STMT; - END IF; - -END $$ - -CALL alter_if_not_exists('item_db2', 'matk', 'ADD COLUMN', 'SMALLINT(5) UNSIGNED DEFAULT NULL AFTER atk') $$ -CALL alter_if_exists('item_db2', 'equip_level', 'CHANGE COLUMN', 'equip_level_min SMALLINT(5) UNSIGNED DEFAULT NULL') $$ -CALL alter_if_not_exists('item_db2', 'equip_level_max', 'ADD COLUMN', 'SMALLINT(5) UNSIGNED DEFAULT NULL AFTER equip_level_min') $$ - -CALL alter_if_exists('item_db2', 'price_buy', 'MODIFY COLUMN', 'MEDIUMINT(10) DEFAULT NULL') $$ -CALL alter_if_exists('item_db2', 'price_sell', 'MODIFY COLUMN', 'MEDIUMINT(10) DEFAULT NULL') $$ -CALL alter_if_exists('item_db2', 'weight', 'MODIFY COLUMN', 'SMALLINT(5) UNSIGNED DEFAULT NULL') $$ -CALL alter_if_exists('item_db2', 'atk', 'MODIFY COLUMN', 'SMALLINT(5) UNSIGNED DEFAULT NULL') $$ -CALL alter_if_exists('item_db2', 'matk', 'MODIFY COLUMN', 'SMALLINT(5) UNSIGNED DEFAULT NULL') $$ -CALL alter_if_exists('item_db2', 'defence', 'MODIFY COLUMN', 'SMALLINT(5) UNSIGNED DEFAULT NULL') $$ -CALL alter_if_exists('item_db2', 'range', 'MODIFY COLUMN', 'TINYINT(2) UNSIGNED DEFAULT NULL') $$ -CALL alter_if_exists('item_db2', 'slots', 'MODIFY COLUMN', 'TINYINT(2) UNSIGNED DEFAULT NULL') $$ -CALL alter_if_exists('item_db2', 'equip_jobs', 'MODIFY COLUMN', 'INT(12) UNSIGNED DEFAULT NULL') $$ -CALL alter_if_exists('item_db2', 'equip_upper', 'MODIFY COLUMN', 'TINYINT(8) UNSIGNED DEFAULT NULL') $$ -CALL alter_if_exists('item_db2', 'equip_genders', 'MODIFY COLUMN', 'TINYINT(2) UNSIGNED DEFAULT NULL') $$ -CALL alter_if_exists('item_db2', 'equip_locations', 'MODIFY COLUMN', 'SMALLINT(4) UNSIGNED DEFAULT NULL') $$ -CALL alter_if_exists('item_db2', 'weapon_level', 'MODIFY COLUMN', 'TINYINT(2) UNSIGNED DEFAULT NULL') $$ -CALL alter_if_exists('item_db2', 'equip_level_min', 'MODIFY COLUMN', 'SMALLINT(5) UNSIGNED DEFAULT NULL') $$ -CALL alter_if_exists('item_db2', 'equip_level_max', 'MODIFY COLUMN', 'SMALLINT(5) UNSIGNED DEFAULT NULL') $$ -CALL alter_if_exists('item_db2', 'refineable', 'MODIFY COLUMN', 'TINYINT(1) UNSIGNED DEFAULT NULL') $$ -CALL alter_if_exists('item_db2', 'view', 'MODIFY COLUMN', 'SMALLINT(3) UNSIGNED DEFAULT NULL') $$ - -DROP PROCEDURE IF EXISTS alter_if_not_exists $$ -DROP PROCEDURE IF EXISTS alter_if_exists $$ - -DELIMITER ';' - -INSERT INTO `sql_updates` (`timestamp`) VALUES (1384473995); diff --git a/sql-files/upgrades/2013-11-15--19-57.sql b/sql-files/upgrades/2013-11-15--19-57.sql deleted file mode 100644 index 86d63cdfe..000000000 --- a/sql-files/upgrades/2013-11-15--19-57.sql +++ /dev/null @@ -1,24 +0,0 @@ -#1384545461 - --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2013-2015 Hercules Dev Team --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - -UPDATE `account_data` SET `base_exp` = '100' WHERE `base_exp` = '0'; -UPDATE `account_data` SET `base_drop` = '100' WHERE `base_drop` = '0'; -UPDATE `account_data` SET `base_death` = '100' WHERE `base_death` = '0'; -INSERT INTO `sql_updates` (`timestamp`) VALUES (1384545461); diff --git a/sql-files/upgrades/2013-11-16--07-49.sql b/sql-files/upgrades/2013-11-16--07-49.sql deleted file mode 100644 index 302a88120..000000000 --- a/sql-files/upgrades/2013-11-16--07-49.sql +++ /dev/null @@ -1,22 +0,0 @@ -#1384588175 - --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2013-2015 Hercules Dev Team --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - -ALTER TABLE `char` ADD COLUMN `unban_time` INT(11) UNSIGNED NOT NULL DEFAULT '0'; -INSERT INTO `sql_updates` (`timestamp`) VALUES (1384588175); diff --git a/sql-files/upgrades/2013-11-18--08-23.sql b/sql-files/upgrades/2013-11-18--08-23.sql deleted file mode 100644 index 8c917c694..000000000 --- a/sql-files/upgrades/2013-11-18--08-23.sql +++ /dev/null @@ -1,85 +0,0 @@ -#1384763034 - - --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2013-2015 Hercules Dev Team --- Copyright (C) 2013 Haru <haru@dotalux.com> --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - --- Note: If you're running a MySQL version earlier than 5.0 (or if this scripts fails for you for any reason) --- you'll need to run the following queries manually: --- --- [ Both Pre-Renewal and Renewal ] --- ALTER TABLE item_db2 ADD COLUMN `bindonequip` TINYINT(1) UNSIGNED DEFAULT NULL AFTER `view`; --- INSERT INTO `sql_updates` (`timestamp`) VALUES (1384763034); --- --- [ End ] --- What follows is the automated script that does all of the above. - -DELIMITER $$ - -DROP PROCEDURE IF EXISTS alter_if_not_exists $$ -DROP PROCEDURE IF EXISTS alter_if_exists $$ - -CREATE PROCEDURE alter_if_not_exists(my_table TINYTEXT, my_column TINYTEXT, my_command TINYTEXT, my_predicate TEXT) -BEGIN - set @dbname = DATABASE(); - IF EXISTS ( - SELECT * FROM information_schema.TABLES - WHERE TABLE_SCHEMA = @dbname - AND TABLE_NAME = my_table - ) AND NOT EXISTS ( - SELECT * FROM information_schema.COLUMNS - WHERE TABLE_SCHEMA = @dbname - AND TABLE_NAME = my_table - AND COLUMN_NAME = my_column - ) - THEN - SET @q = CONCAT('ALTER TABLE ', @dbname, '.', my_table, ' ', - my_command, ' `', my_column, '` ', my_predicate); - PREPARE STMT FROM @q; - EXECUTE STMT; - END IF; - -END $$ - -CREATE PROCEDURE alter_if_exists(my_table TINYTEXT, my_column TINYTEXT, my_command TINYTEXT, my_predicate TEXT) -BEGIN - set @dbname = DATABASE(); - IF EXISTS ( - SELECT * FROM information_schema.COLUMNS - WHERE TABLE_SCHEMA = @dbname - AND TABLE_NAME = my_table - AND COLUMN_NAME = my_column - ) - THEN - SET @q = CONCAT('ALTER TABLE ', @dbname, '.', my_table, ' ', - my_command, ' `', my_column, '` ', my_predicate); - PREPARE STMT FROM @q; - EXECUTE STMT; - END IF; - -END $$ - -CALL alter_if_not_exists('item_db2', 'bindonequip', 'ADD COLUMN', 'TINYINT(1) UNSIGNED DEFAULT NULL AFTER `view`') $$ - -DROP PROCEDURE IF EXISTS alter_if_not_exists $$ -DROP PROCEDURE IF EXISTS alter_if_exists $$ - -DELIMITER ';' - -INSERT INTO `sql_updates` (`timestamp`) VALUES (1384763034); diff --git a/sql-files/upgrades/2013-12-24--00-15.sql b/sql-files/upgrades/2013-12-24--00-15.sql deleted file mode 100644 index 9ae0989d9..000000000 --- a/sql-files/upgrades/2013-12-24--00-15.sql +++ /dev/null @@ -1,27 +0,0 @@ -#1387844126 - --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2013-2015 Hercules Dev Team --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - -CREATE TABLE IF NOT EXISTS `npc_market_data` ( - `name` VARCHAR(24) NOT NULL DEFAULT '', - `itemid` INT(11) UNSIGNED NOT NULL DEFAULT '0', - `amount` INT(11) UNSIGNED NOT NULL DEFAULT '0', - PRIMARY KEY (`name`,`itemid`) -) ENGINE=MyISAM; -INSERT INTO `sql_updates` (`timestamp`) VALUES (1387844126); diff --git a/sql-files/upgrades/2014-01-04--16-47.sql b/sql-files/upgrades/2014-01-04--16-47.sql deleted file mode 100644 index 966381ab6..000000000 --- a/sql-files/upgrades/2014-01-04--16-47.sql +++ /dev/null @@ -1,80 +0,0 @@ -#1388854043 - --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2014-2015 Hercules Dev Team --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - -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); diff --git a/sql-files/upgrades/2014-01-06--17-22.sql b/sql-files/upgrades/2014-01-06--17-22.sql deleted file mode 100644 index 5bdbcde0b..000000000 --- a/sql-files/upgrades/2014-01-06--17-22.sql +++ /dev/null @@ -1,35 +0,0 @@ -#1389028967 - --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2014-2015 Hercules Dev Team --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - -CREATE TABLE IF NOT EXISTS `autotrade_merchants` ( - `account_id` INT(11) NOT NULL DEFAULT '0', - `char_id` INT(11) NOT NULL DEFAULT '0', - `sex` TINYINT(2) NOT NULL DEFAULT '0', - `title` varchar(80) NOT NULL DEFAULT 'Buy From Me!', - PRIMARY KEY (`account_id`,`char_id`) -) ENGINE=MyISAM; -CREATE TABLE IF NOT EXISTS `autotrade_data` ( - `char_id` INT(11) NOT NULL DEFAULT '0', - `itemkey` INT(11) NOT NULL DEFAULT '0', - `amount` INT(11) NOT NULL DEFAULT '0', - `price` INT(11) NOT NULL DEFAULT '0', - PRIMARY KEY (`char_id`,`itemkey`) -) ENGINE=MyISAM; -INSERT INTO `sql_updates` (`timestamp`) VALUES (1389028967); diff --git a/sql-files/upgrades/2014-02-19--17-57.sql b/sql-files/upgrades/2014-02-19--17-57.sql deleted file mode 100644 index 90cd36303..000000000 --- a/sql-files/upgrades/2014-02-19--17-57.sql +++ /dev/null @@ -1,23 +0,0 @@ -#1392832626 - --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2014-2015 Hercules Dev Team --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - -DELETE FROM `sc_data` WHERE `tick` = '-1'; -ALTER TABLE `sc_data` ADD PRIMARY KEY (`account_id`,`char_id`,`type`); -INSERT INTO `sql_updates` (`timestamp`) VALUES (1392832626); diff --git a/sql-files/upgrades/2014-03-25--23-57.sql b/sql-files/upgrades/2014-03-25--23-57.sql deleted file mode 100644 index 3ce623406..000000000 --- a/sql-files/upgrades/2014-03-25--23-57.sql +++ /dev/null @@ -1,22 +0,0 @@ -#1395789302 - --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2014-2015 Hercules Dev Team --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - -ALTER TABLE `charlog` ADD COLUMN `char_id` INT(11) UNSIGNED NOT NULL DEFAULT '0' AFTER `account_id`; -INSERT INTO `sql_updates` (`timestamp`) VALUES (1395789302); diff --git a/sql-files/upgrades/2014-04-07--22-04.sql b/sql-files/upgrades/2014-04-07--22-04.sql deleted file mode 100644 index 67d4fc8b2..000000000 --- a/sql-files/upgrades/2014-04-07--22-04.sql +++ /dev/null @@ -1,22 +0,0 @@ -#1396893866 - --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2014-2015 Hercules Dev Team --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - -ALTER TABLE `char` ADD COLUMN `uniqueitem_counter` BIGINT(20) NOT NULL AFTER `unban_time`; -INSERT INTO `sql_updates` (`timestamp`) VALUES (1396893866); diff --git a/sql-files/upgrades/2014-04-26--10-00.sql b/sql-files/upgrades/2014-04-26--10-00.sql deleted file mode 100644 index cb23bc68b..000000000 --- a/sql-files/upgrades/2014-04-26--10-00.sql +++ /dev/null @@ -1,22 +0,0 @@ -#1398477600 - --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2014-2015 Hercules Dev Team --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - -ALTER TABLE `char` CHANGE COLUMN `uniqueitem_counter` `uniqueitem_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'; -INSERT INTO `sql_updates` (`timestamp`) VALUES (1398477600); diff --git a/sql-files/upgrades/2014-05-17--00-06.sql b/sql-files/upgrades/2014-05-17--00-06.sql deleted file mode 100644 index 6ac8c1292..000000000 --- a/sql-files/upgrades/2014-05-17--00-06.sql +++ /dev/null @@ -1,22 +0,0 @@ -#1400256139 - --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2014-2015 Hercules Dev Team --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - -ALTER TABLE `pet` CHANGE `incuvate` `incubate` int(11) unsigned NOT NULL default '0'; -INSERT INTO `sql_updates` (`timestamp`) VALUES (1400256139); diff --git a/sql-files/upgrades/2014-09-01--16-53.sql b/sql-files/upgrades/2014-09-01--16-53.sql deleted file mode 100644 index 3c77f24c3..000000000 --- a/sql-files/upgrades/2014-09-01--16-53.sql +++ /dev/null @@ -1,24 +0,0 @@ -#1409590380 - --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2014-2015 Hercules Dev Team --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - -ALTER TABLE `account_data` CHANGE `base_exp` `base_exp` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '100', -CHANGE `base_drop` `base_drop` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '100', -CHANGE `base_death` `base_death` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '100'; -INSERT INTO `sql_updates` (`timestamp`) VALUES (1409590380); diff --git a/sql-files/upgrades/2014-11-03--00-45.sql b/sql-files/upgrades/2014-11-03--00-45.sql deleted file mode 100644 index a847004bb..000000000 --- a/sql-files/upgrades/2014-11-03--00-45.sql +++ /dev/null @@ -1,22 +0,0 @@ -#1414975503 - --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2014-2015 Hercules Dev Team --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - -ALTER TABLE `char` ADD COLUMN `sex` ENUM('M','F','U') NOT NULL DEFAULT 'U'; -INSERT INTO `sql_updates` (`timestamp`) VALUES (1414975503); diff --git a/sql-files/upgrades/2015-07-02--18-14.sql b/sql-files/upgrades/2015-07-02--18-14.sql deleted file mode 100644 index e4bbdc484..000000000 --- a/sql-files/upgrades/2015-07-02--18-14.sql +++ /dev/null @@ -1,74 +0,0 @@ -#1435860840 - --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2015 Hercules Dev Team --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - -DELIMITER $$ - -DROP PROCEDURE IF EXISTS alter_if_not_exists $$ -DROP PROCEDURE IF EXISTS alter_if_exists $$ - -CREATE PROCEDURE alter_if_not_exists(my_table TINYTEXT, my_column TINYTEXT, my_command TINYTEXT, my_predicate TEXT) -BEGIN - set @dbname = DATABASE(); - IF EXISTS ( - SELECT * FROM information_schema.TABLES - WHERE TABLE_SCHEMA = @dbname - AND TABLE_NAME = my_table - ) AND NOT EXISTS ( - SELECT * FROM information_schema.COLUMNS - WHERE TABLE_SCHEMA = @dbname - AND TABLE_NAME = my_table - AND COLUMN_NAME = my_column - ) - THEN - SET @q = CONCAT('ALTER TABLE ', @dbname, '.', my_table, ' ', - my_command, ' `', my_column, '` ', my_predicate); - PREPARE STMT FROM @q; - EXECUTE STMT; - END IF; - -END $$ - -CREATE PROCEDURE alter_if_exists(my_table TINYTEXT, my_column TINYTEXT, my_command TINYTEXT, my_predicate TEXT) -BEGIN - set @dbname = DATABASE(); - IF EXISTS ( - SELECT * FROM information_schema.COLUMNS - WHERE TABLE_SCHEMA = @dbname - AND TABLE_NAME = my_table - AND COLUMN_NAME = my_column - ) - THEN - SET @q = CONCAT('ALTER TABLE ', @dbname, '.', my_table, ' ', - my_command, ' `', my_column, '` ', my_predicate); - PREPARE STMT FROM @q; - EXECUTE STMT; - END IF; - -END $$ - -CALL alter_if_not_exists('item_db', 'forceserial', 'ADD COLUMN', 'TINYINT(1) UNSIGNED DEFAULT NULL AFTER `bindonequip`') $$ -CALL alter_if_not_exists('item_db2', 'forceserial', 'ADD COLUMN', 'TINYINT(1) UNSIGNED DEFAULT NULL AFTER `bindonequip`') $$ - -DROP PROCEDURE IF EXISTS alter_if_not_exists $$ -DROP PROCEDURE IF EXISTS alter_if_exists $$ - -DELIMITER ';' - -INSERT INTO `sql_updates` (`timestamp`) VALUES (1435860840); diff --git a/sql-files/upgrades/2015-07-08--13-08.sql b/sql-files/upgrades/2015-07-08--13-08.sql deleted file mode 100644 index 91c7b2638..000000000 --- a/sql-files/upgrades/2015-07-08--13-08.sql +++ /dev/null @@ -1,24 +0,0 @@ -#1436360978 - --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2015 Hercules Dev Team --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - -DROP TABLE IF EXISTS interreg; -DROP TABLE IF EXISTS sstatus; - -INSERT INTO `sql_updates` (`timestamp`) VALUES (1436360978); diff --git a/sql-files/upgrades/2015-08-27--20-42.sql b/sql-files/upgrades/2015-08-27--20-42.sql deleted file mode 100644 index 5be36f899..000000000 --- a/sql-files/upgrades/2015-08-27--20-42.sql +++ /dev/null @@ -1,22 +0,0 @@ -#1440688342 - --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2015 Hercules Dev Team --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - -ALTER TABLE `char` ADD COLUMN `hotkey_rowshift` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0'; -INSERT INTO `sql_updates` (`timestamp`) VALUES (1440688342); diff --git a/sql-files/upgrades/2015-12-16--12-57.sql b/sql-files/upgrades/2015-12-16--12-57.sql deleted file mode 100644 index cc9ce799e..000000000 --- a/sql-files/upgrades/2015-12-16--12-57.sql +++ /dev/null @@ -1,26 +0,0 @@ -#1450241859 - --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2015-2016 Hercules Dev Team --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - -ALTER TABLE `char` MODIFY COLUMN `max_hp` INT(9) NOT NULL DEFAULT '0'; -ALTER TABLE `char` MODIFY COLUMN `max_sp` INT(9) NOT NULL DEFAULT '0'; -ALTER TABLE `char` MODIFY COLUMN `hp` INT(9) NOT NULL DEFAULT '0'; -ALTER TABLE `char` MODIFY COLUMN `sp` INT(9) NOT NULL DEFAULT '0'; - -INSERT INTO `sql_updates` (`timestamp`) VALUES (1450241859); diff --git a/sql-files/upgrades/2015-12-17--15-58.sql b/sql-files/upgrades/2015-12-17--15-58.sql deleted file mode 100644 index 8d3dc51a3..000000000 --- a/sql-files/upgrades/2015-12-17--15-58.sql +++ /dev/null @@ -1,22 +0,0 @@ -#1450367880 - --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2015 Hercules Dev Team --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - -ALTER TABLE `char` ADD `body` smallint(5) unsigned NOT NULL default '0' AFTER `clothes_color`; -INSERT INTO `sql_updates` (`timestamp`) VALUES (1450367880); diff --git a/sql-files/upgrades/2016-03-10--22-18.sql b/sql-files/upgrades/2016-03-10--22-18.sql deleted file mode 100644 index 80266bcca..000000000 --- a/sql-files/upgrades/2016-03-10--22-18.sql +++ /dev/null @@ -1,22 +0,0 @@ -#1457638175 - --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2015-2016 Hercules Dev Team --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - -ALTER TABLE `picklog` MODIFY `type` enum('M','P','L','T','V','S','N','C','A','R','G','E','B','O','I','X','D','U','K','Y','Z','W','Q','J','H','@','0','1','2') NOT NULL default 'P'; -INSERT INTO `sql_updates` (`timestamp`) VALUES (1457638175) diff --git a/sql-files/upgrades/2016-07-08--02-42.sql b/sql-files/upgrades/2016-07-08--02-42.sql deleted file mode 100644 index 94ca7e6db..000000000 --- a/sql-files/upgrades/2016-07-08--02-42.sql +++ /dev/null @@ -1,35 +0,0 @@ -#1467934919 - --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2015-2016 Hercules Dev Team --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - -ALTER TABLE `charlog` MODIFY `time` DATETIME NULL; -ALTER TABLE `interlog` MODIFY `time` DATETIME NULL; -ALTER TABLE `ipbanlist` MODIFY `btime` DATETIME NULL; -ALTER TABLE `ipbanlist` MODIFY `rtime` DATETIME NULL; -ALTER TABLE `login` MODIFY `lastlogin` DATETIME NULL; -ALTER TABLE `login` MODIFY `birthdate` DATE NULL; - -UPDATE `charlog` SET `time` = NULL WHERE `time` = '0000-00-00 00:00:00'; -UPDATE `interlog` SET `time` = NULL WHERE `time` = '0000-00-00 00:00:00'; -UPDATE `ipbanlist` SET `btime` = NULL WHERE `btime` = '0000-00-00 00:00:00'; -UPDATE `ipbanlist` SET `rtime` = NULL WHERE `rtime` = '0000-00-00 00:00:00'; -UPDATE `login` SET `lastlogin` = NULL WHERE `lastlogin` = '0000-00-00 00:00:00'; -UPDATE `login` SET `birthdate` = NULL WHERE `birthdate` = '0000-00-00'; - -INSERT INTO `sql_updates` (`timestamp`) VALUES (1467934919) diff --git a/sql-files/upgrades/2016-07-08--02-51.sql b/sql-files/upgrades/2016-07-08--02-51.sql deleted file mode 100644 index 8ecf1a25f..000000000 --- a/sql-files/upgrades/2016-07-08--02-51.sql +++ /dev/null @@ -1,30 +0,0 @@ -#1467935469 - --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2015-2016 Hercules Dev Team --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - -ALTER TABLE `atcommandlog` MODIFY `atcommand_date` DATETIME NULL; -ALTER TABLE `branchlog` MODIFY `branch_date` DATETIME NULL; -ALTER TABLE `chatlog` MODIFY `time` DATETIME NULL; -ALTER TABLE `loginlog` MODIFY `time` DATETIME NULL; -ALTER TABLE `mvplog` MODIFY `mvp_date` DATETIME NULL; -ALTER TABLE `npclog` MODIFY `npc_date` DATETIME NULL; -ALTER TABLE `picklog` MODIFY `time` DATETIME NULL; -ALTER TABLE `zenylog` MODIFY `time` DATETIME NULL; - -INSERT INTO `sql_updates` (`timestamp`) VALUES (1467935469) diff --git a/sql-files/upgrades/2016-10-03--20-27.sql b/sql-files/upgrades/2016-10-03--20-27.sql deleted file mode 100644 index 6ad840e05..000000000 --- a/sql-files/upgrades/2016-10-03--20-27.sql +++ /dev/null @@ -1,23 +0,0 @@ -#1475526420 - --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2015-2016 Hercules Dev Team --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - -ALTER TABLE `charlog` ADD `class` MEDIUMINT(9) NOT NULL DEFAULT '0' AFTER `char_num`; - -INSERT INTO `sql_updates` (`timestamp`) VALUES (1475526420); diff --git a/sql-files/upgrades/2016-10-26--10-29.sql b/sql-files/upgrades/2016-10-26--10-29.sql deleted file mode 100644 index cabd7db10..000000000 --- a/sql-files/upgrades/2016-10-26--10-29.sql +++ /dev/null @@ -1,23 +0,0 @@ -#1477434595 - --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2015-2016 Hercules Dev Team --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - -ALTER TABLE `zenylog` CHANGE `type` `type` ENUM('T','V','P','M','S','N','D','C','A','E','I','B','K') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'S'; - -INSERT INTO `sql_updates` (`timestamp`, `ignored`) VALUES (1477434595 , 'No'); diff --git a/sql-files/upgrades/2017-03-02--11-40.sql b/sql-files/upgrades/2017-03-02--11-40.sql deleted file mode 100644 index 30798b5df..000000000 --- a/sql-files/upgrades/2017-03-02--11-40.sql +++ /dev/null @@ -1,93 +0,0 @@ -#1488454834 - --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2015-2016 Hercules Dev Team --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - -ALTER TABLE `auction` - ADD COLUMN `opt_idx0` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `card3`, - ADD COLUMN `opt_val0` SMALLINT(5) NOT NULL DEFAULT '0' AFTER `opt_idx0`, - ADD COLUMN `opt_idx1` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `opt_val0`, - ADD COLUMN `opt_val1` SMALLINT(5) NOT NULL DEFAULT '0' AFTER `opt_idx1`, - ADD COLUMN `opt_idx2` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `opt_val1`, - ADD COLUMN `opt_val2` SMALLINT(5) NOT NULL DEFAULT '0' AFTER `opt_idx2`, - ADD COLUMN `opt_idx3` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `opt_val2`, - ADD COLUMN `opt_val3` SMALLINT(5) NOT NULL DEFAULT '0' AFTER `opt_idx3`, - ADD COLUMN `opt_idx4` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `opt_val3`, - ADD COLUMN `opt_val4` SMALLINT(5) NOT NULL DEFAULT '0' AFTER `opt_idx4`; - -ALTER TABLE `cart_inventory` - ADD COLUMN `opt_idx0` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `card3`, - ADD COLUMN `opt_val0` SMALLINT(5) NOT NULL DEFAULT '0' AFTER `opt_idx0`, - ADD COLUMN `opt_idx1` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `opt_val0`, - ADD COLUMN `opt_val1` SMALLINT(5) NOT NULL DEFAULT '0' AFTER `opt_idx1`, - ADD COLUMN `opt_idx2` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `opt_val1`, - ADD COLUMN `opt_val2` SMALLINT(5) NOT NULL DEFAULT '0' AFTER `opt_idx2`, - ADD COLUMN `opt_idx3` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `opt_val2`, - ADD COLUMN `opt_val3` SMALLINT(5) NOT NULL DEFAULT '0' AFTER `opt_idx3`, - ADD COLUMN `opt_idx4` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `opt_val3`, - ADD COLUMN `opt_val4` SMALLINT(5) NOT NULL DEFAULT '0' AFTER `opt_idx4`; - -ALTER TABLE `guild_storage` - ADD COLUMN `opt_idx0` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `card3`, - ADD COLUMN `opt_val0` SMALLINT(5) NOT NULL DEFAULT '0' AFTER `opt_idx0`, - ADD COLUMN `opt_idx1` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `opt_val0`, - ADD COLUMN `opt_val1` SMALLINT(5) NOT NULL DEFAULT '0' AFTER `opt_idx1`, - ADD COLUMN `opt_idx2` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `opt_val1`, - ADD COLUMN `opt_val2` SMALLINT(5) NOT NULL DEFAULT '0' AFTER `opt_idx2`, - ADD COLUMN `opt_idx3` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `opt_val2`, - ADD COLUMN `opt_val3` SMALLINT(5) NOT NULL DEFAULT '0' AFTER `opt_idx3`, - ADD COLUMN `opt_idx4` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `opt_val3`, - ADD COLUMN `opt_val4` SMALLINT(5) NOT NULL DEFAULT '0' AFTER `opt_idx4`; - -ALTER TABLE `inventory` - ADD COLUMN `opt_idx0` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `card3`, - ADD COLUMN `opt_val0` SMALLINT(5) NOT NULL DEFAULT '0' AFTER `opt_idx0`, - ADD COLUMN `opt_idx1` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `opt_val0`, - ADD COLUMN `opt_val1` SMALLINT(5) NOT NULL DEFAULT '0' AFTER `opt_idx1`, - ADD COLUMN `opt_idx2` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `opt_val1`, - ADD COLUMN `opt_val2` SMALLINT(5) NOT NULL DEFAULT '0' AFTER `opt_idx2`, - ADD COLUMN `opt_idx3` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `opt_val2`, - ADD COLUMN `opt_val3` SMALLINT(5) NOT NULL DEFAULT '0' AFTER `opt_idx3`, - ADD COLUMN `opt_idx4` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `opt_val3`, - ADD COLUMN `opt_val4` SMALLINT(5) NOT NULL DEFAULT '0' AFTER `opt_idx4`; - -ALTER TABLE `mail` - ADD COLUMN `opt_idx0` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `card3`, - ADD COLUMN `opt_val0` SMALLINT(5) NOT NULL DEFAULT '0' AFTER `opt_idx0`, - ADD COLUMN `opt_idx1` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `opt_val0`, - ADD COLUMN `opt_val1` SMALLINT(5) NOT NULL DEFAULT '0' AFTER `opt_idx1`, - ADD COLUMN `opt_idx2` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `opt_val1`, - ADD COLUMN `opt_val2` SMALLINT(5) NOT NULL DEFAULT '0' AFTER `opt_idx2`, - ADD COLUMN `opt_idx3` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `opt_val2`, - ADD COLUMN `opt_val3` SMALLINT(5) NOT NULL DEFAULT '0' AFTER `opt_idx3`, - ADD COLUMN `opt_idx4` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `opt_val3`, - ADD COLUMN `opt_val4` SMALLINT(5) NOT NULL DEFAULT '0' AFTER `opt_idx4`; - -ALTER TABLE `storage` - ADD COLUMN `opt_idx0` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `card3`, - ADD COLUMN `opt_val0` SMALLINT(5) NOT NULL DEFAULT '0' AFTER `opt_idx0`, - ADD COLUMN `opt_idx1` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `opt_val0`, - ADD COLUMN `opt_val1` SMALLINT(5) NOT NULL DEFAULT '0' AFTER `opt_idx1`, - ADD COLUMN `opt_idx2` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `opt_val1`, - ADD COLUMN `opt_val2` SMALLINT(5) NOT NULL DEFAULT '0' AFTER `opt_idx2`, - ADD COLUMN `opt_idx3` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `opt_val2`, - ADD COLUMN `opt_val3` SMALLINT(5) NOT NULL DEFAULT '0' AFTER `opt_idx3`, - ADD COLUMN `opt_idx4` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `opt_val3`, - ADD COLUMN `opt_val4` SMALLINT(5) NOT NULL DEFAULT '0' AFTER `opt_idx4`; - -INSERT INTO `sql_updates` (`timestamp`, `ignored`) VALUES (1488454834 , 'No'); diff --git a/sql-files/upgrades/2017-03-05--08-09.sql b/sql-files/upgrades/2017-03-05--08-09.sql deleted file mode 100644 index 3b5ee1a23..000000000 --- a/sql-files/upgrades/2017-03-05--08-09.sql +++ /dev/null @@ -1,15 +0,0 @@ -#1488744559 - -ALTER TABLE `picklog` - ADD COLUMN `opt_idx0` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `card3`, - ADD COLUMN `opt_val0` SMALLINT(5) NOT NULL DEFAULT '0' AFTER `opt_idx0`, - ADD COLUMN `opt_idx1` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `opt_val0`, - ADD COLUMN `opt_val1` SMALLINT(5) NOT NULL DEFAULT '0' AFTER `opt_idx1`, - ADD COLUMN `opt_idx2` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `opt_val1`, - ADD COLUMN `opt_val2` SMALLINT(5) NOT NULL DEFAULT '0' AFTER `opt_idx2`, - ADD COLUMN `opt_idx3` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `opt_val2`, - ADD COLUMN `opt_val3` SMALLINT(5) NOT NULL DEFAULT '0' AFTER `opt_idx3`, - ADD COLUMN `opt_idx4` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `opt_val3`, - ADD COLUMN `opt_val4` SMALLINT(5) NOT NULL DEFAULT '0' AFTER `opt_idx4`; - -INSERT INTO `sql_updates` (`timestamp`, `ignored`) VALUES (1488744559 , 'No'); diff --git a/sql-files/upgrades/2017-03-15--14-29.sql b/sql-files/upgrades/2017-03-15--14-29.sql deleted file mode 100644 index 6e6044738..000000000 --- a/sql-files/upgrades/2017-03-15--14-29.sql +++ /dev/null @@ -1,74 +0,0 @@ -#1489588190 - --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2017 Hercules Dev Team --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - -CREATE TABLE IF NOT EXISTS `rodex_items` ( - `id` INT(11) NOT NULL AUTO_INCREMENT, - `mail_id` BIGINT(20) NOT NULL DEFAULT '0', - `nameid` INT(11) NOT NULL DEFAULT '0', - `amount` INT(11) NOT NULL DEFAULT '0', - `equip` INT(11) UNSIGNED NOT NULL DEFAULT '0', - `identify` SMALLINT(6) NOT NULL DEFAULT '0', - `refine` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0', - `attribute` TINYINT(4) NOT NULL DEFAULT '0', - `card0` SMALLINT(11) NOT NULL DEFAULT '0', - `card1` SMALLINT(11) NOT NULL DEFAULT '0', - `card2` SMALLINT(11) NOT NULL DEFAULT '0', - `card3` SMALLINT(11) NOT NULL DEFAULT '0', - `opt_idx0` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0', - `opt_val0` SMALLINT(5) NOT NULL DEFAULT '0', - `opt_idx1` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0', - `opt_val1` SMALLINT(5) NOT NULL DEFAULT '0', - `opt_idx2` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0', - `opt_val2` SMALLINT(5) NOT NULL DEFAULT '0', - `opt_idx3` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0', - `opt_val3` SMALLINT(5) NOT NULL DEFAULT '0', - `opt_idx4` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0', - `opt_val4` SMALLINT(5) NOT NULL DEFAULT '0', - `expire_time` INT(11) UNSIGNED NOT NULL DEFAULT '0', - `bound` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', - `unique_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - KEY `mail_id` (`mail_id`) -) ENGINE=InnoDB; - -CREATE TABLE IF NOT EXISTS `rodex_mail` ( - `mail_id` BIGINT(20) NOT NULL AUTO_INCREMENT, - `sender_name` VARCHAR(30) NOT NULL COLLATE 'utf8_unicode_ci', - `sender_id` INT(11) NOT NULL, - `receiver_name` VARCHAR(30) NOT NULL COLLATE 'utf8_unicode_ci', - `receiver_id` INT(11) NOT NULL, - `receiver_accountid` INT(11) NOT NULL, - `title` VARCHAR(50) NOT NULL COLLATE 'utf8_unicode_ci', - `body` VARCHAR(510) NOT NULL COLLATE 'utf8_unicode_ci', - `zeny` BIGINT(20) NOT NULL, - `type` TINYINT(8) UNSIGNED NOT NULL, - `is_read` TINYINT(8) NOT NULL, - `send_date` INT(11) NOT NULL, - `expire_date` INT(11) NOT NULL, - `weight` INT(11) NOT NULL, - PRIMARY KEY (`mail_id`), - KEY `sender_id` (`sender_id`), - KEY `receiver_id` (`receiver_id`), - KEY `receiver_accountid` (`receiver_accountid`), - KEY `send_date` (`send_date`), - KEY `expire_date` (`expire_date`) -) ENGINE=MyISAM; - -INSERT INTO `sql_updates` (`timestamp`, `ignored`) VALUES (1489588190 , 'No'); diff --git a/sql-files/upgrades/2017-06-04--15-04.sql b/sql-files/upgrades/2017-06-04--15-04.sql deleted file mode 100644 index 0805d054b..000000000 --- a/sql-files/upgrades/2017-06-04--15-04.sql +++ /dev/null @@ -1,24 +0,0 @@ -#1496588640 - --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2017 Hercules Dev Team --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - -ALTER TABLE `char` ADD COLUMN `clan_id` INT(11) UNSIGNED NOT NULL DEFAULT '0' AFTER `guild_id`; -ALTER TABLE `char` ADD COLUMN `last_login` BIGINT(20) NULL DEFAULT '0' AFTER `robe`; - -INSERT INTO `sql_updates` (`timestamp`, `ignored`) VALUES (1496588640 , 'No'); diff --git a/sql-files/upgrades/2017-06-04--15-05.sql b/sql-files/upgrades/2017-06-04--15-05.sql deleted file mode 100644 index 550197a15..000000000 --- a/sql-files/upgrades/2017-06-04--15-05.sql +++ /dev/null @@ -1,23 +0,0 @@ -#1496588700 - --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2017 Hercules Dev Team --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - -ALTER TABLE `chatlog` MODIFY COLUMN `type` enum('O','W','P','G','M','C') NOT NULL DEFAULT 'O' AFTER `time`; - -INSERT INTO `sql_updates` (`timestamp`, `ignored`) VALUES (1496588700 , 'No'); diff --git a/sql-files/upgrades/2017-11-04--10-39.sql b/sql-files/upgrades/2017-11-04--10-39.sql deleted file mode 100644 index f95dbef0c..000000000 --- a/sql-files/upgrades/2017-11-04--10-39.sql +++ /dev/null @@ -1,6 +0,0 @@ -#1509835214 - -ALTER TABLE `homunculus` - ADD COLUMN `autofeed` TINYINT(2) NOT NULL DEFAULT '0' AFTER `vaporize`; - -INSERT INTO `sql_updates` (`timestamp`, `ignored`) VALUES (1509835214 , 'No'); diff --git a/sql-files/upgrades/2018-02-26--15-57.sql b/sql-files/upgrades/2018-02-26--15-57.sql deleted file mode 100644 index a2090bb3c..000000000 --- a/sql-files/upgrades/2018-02-26--15-57.sql +++ /dev/null @@ -1,6 +0,0 @@ -#1519671456 - -ALTER TABLE `rodex_mail` - ADD COLUMN `sender_read` TINYINT(2) NOT NULL DEFAULT '0' AFTER `is_read`; - -INSERT INTO `sql_updates` (`timestamp`, `ignored`) VALUES (1519671456 , 'No'); diff --git a/sql-files/upgrades/2018-03-10--04-06.sql b/sql-files/upgrades/2018-03-10--04-06.sql deleted file mode 100644 index ee827735d..000000000 --- a/sql-files/upgrades/2018-03-10--04-06.sql +++ /dev/null @@ -1,24 +0,0 @@ -#1520654809 - --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2017 Hercules Dev Team --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - -ALTER TABLE `char` ADD COLUMN `attendance_count` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0' AFTER `hotkey_rowshift`; -ALTER TABLE `char` ADD COLUMN `attendance_timer` BIGINT(20) NULL DEFAULT '0' AFTER `attendance_count`; - -INSERT INTO `sql_updates` (`timestamp`, `ignored`) VALUES (1520654809 , 'No'); diff --git a/sql-files/upgrades/2018-06-03--00-10.sql b/sql-files/upgrades/2018-06-03--00-10.sql deleted file mode 100644 index c7f6ac48d..000000000 --- a/sql-files/upgrades/2018-06-03--00-10.sql +++ /dev/null @@ -1,40 +0,0 @@ -#1527964800 - --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2018 Hercules Dev Team --- Copyright (C) Smokexyz --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - -CREATE TABLE `char_achievements` ( - `char_id` INT(11) UNSIGNED NOT NULL, - `ach_id` INT(11) UNSIGNED NOT NULL, - `completed_at` INT(10) UNSIGNED NOT NULL DEFAULT '0', - `rewarded_at` INT(10) UNSIGNED NOT NULL DEFAULT '0', - `obj_0` INT(10) UNSIGNED NOT NULL DEFAULT '0', - `obj_1` INT(10) UNSIGNED NOT NULL DEFAULT '0', - `obj_2` INT(10) UNSIGNED NOT NULL DEFAULT '0', - `obj_3` INT(10) UNSIGNED NOT NULL DEFAULT '0', - `obj_4` INT(10) UNSIGNED NOT NULL DEFAULT '0', - `obj_5` INT(10) UNSIGNED NOT NULL DEFAULT '0', - `obj_6` INT(10) UNSIGNED NOT NULL DEFAULT '0', - `obj_7` INT(10) UNSIGNED NOT NULL DEFAULT '0', - `obj_8` INT(10) UNSIGNED NOT NULL DEFAULT '0', - `obj_9` INT(10) UNSIGNED NOT NULL DEFAULT '0', - PRIMARY KEY (`char_id`, `ach_id`) -) ENGINE=MyISAM; - -INSERT INTO `sql_updates` (`timestamp`, `ignored`) VALUES (1527964800, 'No'); diff --git a/sql-files/upgrades/2018-06-03--17-16.sql b/sql-files/upgrades/2018-06-03--17-16.sql deleted file mode 100644 index e14ca62ca..000000000 --- a/sql-files/upgrades/2018-06-03--17-16.sql +++ /dev/null @@ -1,24 +0,0 @@ -#1528026381 - --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2018 Hercules Dev Team --- Copyright (C) Dastgir --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - -ALTER TABLE `char` ADD `title_id` INT(11) UNSIGNED NOT NULL DEFAULT '0'; - -INSERT INTO `sql_updates` (`timestamp`, `ignored`) VALUES (1528026381, 'No'); diff --git a/sql-files/upgrades/2018-06-05--12-02.sql b/sql-files/upgrades/2018-06-05--12-02.sql deleted file mode 100644 index 26c22243f..000000000 --- a/sql-files/upgrades/2018-06-05--12-02.sql +++ /dev/null @@ -1,24 +0,0 @@ -#1528180320 - --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2018 Hercules Dev Team --- Copyright (C) 2018 Dastgir --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - -ALTER TABLE `pet` ADD COLUMN `autofeed` TINYINT(2) UNSIGNED NOT NULL DEFAULT '0'; - -INSERT INTO `sql_updates` (`timestamp`, `ignored`) VALUES (1528180320 , 'No'); diff --git a/sql-files/upgrades/2018-07-24--03-23.sql b/sql-files/upgrades/2018-07-24--03-23.sql deleted file mode 100644 index a8d2d8f77..000000000 --- a/sql-files/upgrades/2018-07-24--03-23.sql +++ /dev/null @@ -1,22 +0,0 @@ -#1532403228 - --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2018 Hercules Dev Team --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - -UPDATE `inventory` SET `identify` = 1, `attribute` = 1 WHERE `card0` = -256 and `identify` = 0; -INSERT INTO `sql_updates` (`timestamp`) VALUES (1532403228); diff --git a/sql-files/upgrades/2018-09-01--05-22.sql b/sql-files/upgrades/2018-09-01--05-22.sql deleted file mode 100644 index 7a834edd4..000000000 --- a/sql-files/upgrades/2018-09-01--05-22.sql +++ /dev/null @@ -1,63 +0,0 @@ -#1535865732 - --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2018 Hercules Dev Team --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - -ALTER TABLE `auction` - MODIFY `card0` INT(11) NOT NULL DEFAULT '0', - MODIFY `card1` INT(11) NOT NULL DEFAULT '0', - MODIFY `card2` INT(11) NOT NULL DEFAULT '0', - MODIFY `card3` INT(11) NOT NULL DEFAULT '0'; - -ALTER TABLE `cart_inventory` - MODIFY `card0` INT(11) NOT NULL DEFAULT '0', - MODIFY `card1` INT(11) NOT NULL DEFAULT '0', - MODIFY `card2` INT(11) NOT NULL DEFAULT '0', - MODIFY `card3` INT(11) NOT NULL DEFAULT '0'; - -ALTER TABLE `guild_storage` - MODIFY `card0` INT(11) NOT NULL DEFAULT '0', - MODIFY `card1` INT(11) NOT NULL DEFAULT '0', - MODIFY `card2` INT(11) NOT NULL DEFAULT '0', - MODIFY `card3` INT(11) NOT NULL DEFAULT '0'; - -ALTER TABLE `inventory` - MODIFY `card0` INT(11) NOT NULL DEFAULT '0', - MODIFY `card1` INT(11) NOT NULL DEFAULT '0', - MODIFY `card2` INT(11) NOT NULL DEFAULT '0', - MODIFY `card3` INT(11) NOT NULL DEFAULT '0'; - -ALTER TABLE `mail` - MODIFY `card0` INT(11) NOT NULL DEFAULT '0', - MODIFY `card1` INT(11) NOT NULL DEFAULT '0', - MODIFY `card2` INT(11) NOT NULL DEFAULT '0', - MODIFY `card3` INT(11) NOT NULL DEFAULT '0'; - -ALTER TABLE `rodex_items` - MODIFY `card0` INT(11) NOT NULL DEFAULT '0', - MODIFY `card1` INT(11) NOT NULL DEFAULT '0', - MODIFY `card2` INT(11) NOT NULL DEFAULT '0', - MODIFY `card3` INT(11) NOT NULL DEFAULT '0'; - -ALTER TABLE `storage` - MODIFY `card0` INT(11) NOT NULL DEFAULT '0', - MODIFY `card1` INT(11) NOT NULL DEFAULT '0', - MODIFY `card2` INT(11) NOT NULL DEFAULT '0', - MODIFY `card3` INT(11) NOT NULL DEFAULT '0'; - -INSERT INTO `sql_updates` (`timestamp`, `ignored`) VALUES (1535865732, 'No'); diff --git a/sql-files/upgrades/2018-12-14--01-02.sql b/sql-files/upgrades/2018-12-14--01-02.sql deleted file mode 100644 index 7bcd583c2..000000000 --- a/sql-files/upgrades/2018-12-14--01-02.sql +++ /dev/null @@ -1,24 +0,0 @@ -#1544738447 - --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2018 Hercules Dev Team --- Copyright (C) 4144 --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - -ALTER TABLE `char` ADD `inventory_size` INT(11) UNSIGNED NOT NULL DEFAULT '100'; - -INSERT INTO `sql_updates` (`timestamp`, `ignored`) VALUES (1544738447, 'No'); diff --git a/sql-files/upgrades/2018-12-29--07-51.sql b/sql-files/upgrades/2018-12-29--07-51.sql deleted file mode 100644 index 641179399..000000000 --- a/sql-files/upgrades/2018-12-29--07-51.sql +++ /dev/null @@ -1,29 +0,0 @@ -#1546059075 - --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2013-2015 Hercules Dev Team --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - -CREATE TABLE IF NOT EXISTS `npc_barter_data` ( - `name` VARCHAR(24) NOT NULL DEFAULT '', - `itemId` INT(11) UNSIGNED NOT NULL DEFAULT '0', - `amount` INT(11) UNSIGNED NOT NULL DEFAULT '0', - `priceId` INT(11) UNSIGNED NOT NULL DEFAULT '0', - `priceAmount` INT(11) UNSIGNED NOT NULL DEFAULT '0', - PRIMARY KEY (`name`, `itemid`, `priceId`, `priceAmount`) -) ENGINE=MyISAM; -INSERT INTO `sql_updates` (`timestamp`) VALUES (1546059075); diff --git a/sql-files/upgrades/eAthena-logs-upgrade.sql b/sql-files/upgrades/eAthena-logs-upgrade.sql deleted file mode 100644 index 014f119e3..000000000 --- a/sql-files/upgrades/eAthena-logs-upgrade.sql +++ /dev/null @@ -1,53 +0,0 @@ --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2013-2015 Hercules Dev Team --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - --- --- Upgrade file to be used when going from eAthena to Hercules --- Note: If you're not up to date with eAthena, go through their upgrade files first and run them before this file. --- Note: After runing this file run Hercules upgrade files. --- - --- Adds 'I' and 'X' to `type` in `picklog` table -ALTER TABLE `picklog` MODIFY `type` ENUM('M','P','L','T','V','S','N','C','A','R','G','E','B','O','I','X') NOT NULL DEFAULT 'P'; - --- Adds 'D' and 'U' to `type` in `picklog` table -ALTER TABLE `picklog` MODIFY `type` ENUM('M','P','L','T','V','S','N','C','A','R','G','E','B','O','I','X','D','U') NOT NULL DEFAULT 'P'; - --- Adds unique ID to `picklog` table -ALTER TABLE `picklog` ADD `nsiuid` BIGINT NOT NULL DEFAULT '0' AFTER `card3`; - --- Change `nsiuid` to BIGINT(20) -ALTER TABLE `picklog` CHANGE `nsiuid` `unique_id` BIGINT( 20 ) NOT NULL DEFAULT '0'; - --- Adds 'I' to `type` in `zenylog` -ALTER TABLE `zenylog` MODIFY `type` ENUM('M','T','V','S','N','A','E','B','I') NOT NULL DEFAULT 'S'; - --- Adds 'D' to `type` in `zenylog` -ALTER TABLE `zenylog` MODIFY `type` ENUM('M','T','V','S','N','A','E','B','I','D') NOT NULL DEFAULT 'S'; - --- Add 'P' and 'C' types in `zenylog` -ALTER TABLE `zenylog` MODIFY `type` ENUM('T','V','P','M','S','N','D','C','A','E','I','B') NOT NULL DEFAULT 'S'; - -ALTER TABLE `atcommandlog` MODIFY `atcommand_date` DATETIME NULL; -ALTER TABLE `branchlog` MODIFY `branch_date` DATETIME NULL; -ALTER TABLE `chatlog` MODIFY `time` DATETIME NULL; -ALTER TABLE `loginlog` MODIFY `time` DATETIME NULL; -ALTER TABLE `mvplog` MODIFY `mvp_date` DATETIME NULL; -ALTER TABLE `npclog` MODIFY `npc_date` DATETIME NULL; -ALTER TABLE `picklog` MODIFY `time` DATETIME NULL; -ALTER TABLE `zenylog` MODIFY `time` DATETIME NULL; diff --git a/sql-files/upgrades/eAthena-main-upgrade.sql b/sql-files/upgrades/eAthena-main-upgrade.sql deleted file mode 100644 index 647c9e004..000000000 --- a/sql-files/upgrades/eAthena-main-upgrade.sql +++ /dev/null @@ -1,127 +0,0 @@ --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2013-2015 Hercules Dev Team --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - --- --- Upgrade file to be used when going from eAthena to Hercules --- Note: If you're not up to date with eAthena, go through their upgrade files first and run them before this file. --- Note: After runing this file run Hercules upgrade files. --- - -ALTER TABLE `global_reg_value` MODIFY `type` TINYINT(1) UNSIGNED NOT NULL DEFAULT '3'; - --- `ExpPer` column removed from `mob_db` and `mob_db2` tables -ALTER TABLE `mob_db` DROP COLUMN `ExpPer`; -ALTER TABLE `mob_db2` DROP COLUMN `ExpPer`; - --- Rename `level` column to `group_id` in `login` table -ALTER TABLE `login` CHANGE COLUMN `level` `group_id` TINYINT(3) NOT NULL DEFAULT '0'; - -ALTER TABLE `char` ADD COLUMN `elemental_id` INT(11) UNSIGNED NOT NULL DEFAULT '0'; - -CREATE TABLE IF NOT EXISTS `elemental` ( - `ele_id` INT(11) UNSIGNED NOT NULL auto_increment, - `char_id` INT(11) NOT NULL, - `class` MEDIUMINT(9) UNSIGNED NOT NULL DEFAULT '0', - `mode` INT(11) UNSIGNED NOT NULL DEFAULT '1', - `hp` INT(12) NOT NULL DEFAULT '1', - `sp` INT(12) NOT NULL DEFAULT '1', - `max_hp` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', - `max_sp` MEDIUMINT(6) UNSIGNED NOT NULL DEFAULT '0', - `str` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0', - `agi` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0', - `vit` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0', - `INT` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0', - `dex` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0', - `luk` SMALLINT(4) UNSIGNED NOT NULL DEFAULT '0', - `life_time` INT(11) NOT NULL DEFAULT '0', - PRIMARY KEY (`ele_id`) -) ENGINE=MyISAM; - -ALTER TABLE `char` ADD CONSTRAINT `name_key` UNIQUE (`name`); - -ALTER TABLE `inventory` ADD COLUMN `favorite` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0' AFTER `expire_time`; - -ALTER TABLE `item_db_re` CHANGE `equip_level` `equip_level` VARCHAR(10) DEFAULT ''; - -ALTER TABLE `item_db_re` MODIFY COLUMN `atk:matk` VARCHAR(11) DEFAULT ''; - -ALTER TABLE `item_db_re` MODIFY COLUMN `defence` SMALLINT(5) UNSIGNED DEFAULT NULL; - -ALTER TABLE `homunculus` ADD `prev_class` MEDIUMINT( 9 ) NOT NULL AFTER `class`; - -ALTER TABLE `item_db_re` MODIFY `defence` SMALLINT(5) DEFAULT NULL; - -ALTER TABLE `item_db` MODIFY `defence` SMALLINT(5) DEFAULT NULL; - -ALTER TABLE `elemental` CHANGE COLUMN `str` `atk1` MEDIUMINT(6) UNSIGNED NOT NULL DEFAULT 0, - CHANGE COLUMN `agi` `atk2` MEDIUMINT(6) UNSIGNED NOT NULL DEFAULT 0, - CHANGE COLUMN `vit` `matk` MEDIUMINT(6) UNSIGNED NOT NULL DEFAULT 0, - CHANGE COLUMN `INT` `aspd` SMALLINT(4) UNSIGNED NOT NULL DEFAULT 0, - CHANGE COLUMN `dex` `def` SMALLINT(4) UNSIGNED NOT NULL DEFAULT 0, - CHANGE COLUMN `luk` `mdef` SMALLINT(4) UNSIGNED NOT NULL DEFAULT 0, - CHANGE COLUMN `life_time` `flee` SMALLINT(4) UNSIGNED NOT NULL DEFAULT 0, - ADD COLUMN `hit` SMALLINT(4) UNSIGNED NOT NULL DEFAULT 0 AFTER `flee`, - ADD COLUMN `life_time` INT(11) NOT NULL DEFAULT 0 AFTER `hit`; - -CREATE TABLE IF NOT EXISTS `interreg` ( - `varname` VARCHAR(11) NOT NULL, - `value` VARCHAR(20) NOT NULL, - PRIMARY KEY (`varname`) -) ENGINE=InnoDB; - -INSERT INTO `interreg` (`varname`, `value`) VALUES ('nsiuid', '0'); - -ALTER TABLE `auction` ADD `nsiuid` BIGINT NOT NULL DEFAULT '0'; - -ALTER TABLE `cart_inventory` ADD `nsiuid` BIGINT NOT NULL DEFAULT '0'; - -ALTER TABLE `guild_storage` ADD `nsiuid` BIGINT NOT NULL DEFAULT '0'; - -ALTER TABLE `inventory` ADD `nsiuid` BIGINT NOT NULL DEFAULT '0'; - -ALTER TABLE `mail` ADD `nsiuid` BIGINT NOT NULL DEFAULT '0'; - -ALTER TABLE `storage` ADD `nsiuid` BIGINT NOT NULL DEFAULT '0'; - -UPDATE `interreg` SET `varname` = 'unique_id' WHERE `interreg`.`varname` = 'nsiuid'; - -ALTER TABLE `auction` CHANGE `nsiuid` `unique_id` BIGINT( 20 ) NOT NULL DEFAULT '0'; - -ALTER TABLE `cart_inventory` CHANGE `nsiuid` `unique_id` BIGINT( 20 ) NOT NULL DEFAULT '0'; - -ALTER TABLE `guild_storage` CHANGE `nsiuid` `unique_id` BIGINT( 20 ) NOT NULL DEFAULT '0'; - -ALTER TABLE `inventory` CHANGE `nsiuid` `unique_id` BIGINT( 20 ) NOT NULL DEFAULT '0'; - -ALTER TABLE `mail` CHANGE `nsiuid` `unique_id` BIGINT( 20 ) NOT NULL DEFAULT '0'; - -ALTER TABLE `storage` CHANGE `nsiuid` `unique_id` BIGINT( 20 ) NOT NULL DEFAULT '0'; - -ALTER TABLE `charlog` MODIFY `time` DATETIME NULL; -ALTER TABLE `interlog` MODIFY `time` DATETIME NULL; -ALTER TABLE `ipbanlist` MODIFY `btime` DATETIME NULL; -ALTER TABLE `ipbanlist` MODIFY `rtime` DATETIME NULL; -ALTER TABLE `login` MODIFY `lastlogin` DATETIME NULL; -ALTER TABLE `login` MODIFY `birthdate` DATE NULL; - -UPDATE `charlog` SET `time` = NULL WHERE `time` = '0000-00-00 00:00:00'; -UPDATE `interlog` SET `time` = NULL WHERE `time` = '0000-00-00 00:00:00'; -UPDATE `ipbanlist` SET `btime` = NULL WHERE `btime` = '0000-00-00 00:00:00'; -UPDATE `ipbanlist` SET `rtime` = NULL WHERE `rtime` = '0000-00-00 00:00:00'; -UPDATE `login` SET `lastlogin` = NULL WHERE `lastlogin` = '0000-00-00 00:00:00'; -UPDATE `login` SET `birthdate` = NULL WHERE `birthdate` = '0000-00-00'; diff --git a/sql-files/upgrades/index.txt b/sql-files/upgrades/index.txt deleted file mode 100644 index 3a2fc4c33..000000000 --- a/sql-files/upgrades/index.txt +++ /dev/null @@ -1,54 +0,0 @@ -2013-02-14--16-15.sql -2013-02-15--18-06.sql -2013-03-05--01-05.sql -2013-03-06--00-00.sql -2013-03-09--01-56.sql -2013-03-27--18-35.sql -2013-04-16--01-24.sql -2013-04-16--02-15.sql -2013-10-09--21-38.sql -2013-10-10--16-36.sql -2013-10-27--16-47.sql -2013-10-30--19-53.sql -2013-10-30--21-12.sql -2013-10-31--07-49.sql -2013-11-09--00-03.sql -2013-11-15--00-06.sql -2013-11-15--19-57.sql -2013-11-16--07-49.sql -2013-11-18--08-23.sql -2013-12-24--00-15.sql -2014-01-04--16-47.sql -2014-01-06--17-22.sql -2014-02-19--17-57.sql -2014-03-25--23-57.sql -2014-04-07--22-04.sql -2014-04-26--10-00.sql -2014-05-17--00-06.sql -2014-09-01--16-53.sql -2014-11-03--00-45.sql -2015-07-02--18-14.sql -2015-07-08--13-08.sql -2015-08-27--20-42.sql -2015-12-16--12-57.sql -2015-12-17--15-58.sql -2016-03-10--22-18.sql -2016-07-08--02-42.sql -2016-07-08--02-51.sql -2016-10-03--20-27.sql -2016-10-26--10-29.sql -2017-03-02--11-40.sql -2017-03-05--08-09.sql -2017-03-15--14-29.sql -2017-06-04--15-04.sql -2017-06-04--15-05.sql -2017-11-04--10-39.sql -2018-02-26--15-57.sql -2018-03-10--04-06.sql -2018-06-03--00-10.sql -2018-06-03--17-16.sql -2018-06-05--12-02.sql -2018-07-24--03-23.sql -2018-09-01--05-22.sql -2018-12-14--01-02.sql -2018-12-29--07-51.sql diff --git a/sql-files/upgrades/rAthena-logs-upgrade.sql b/sql-files/upgrades/rAthena-logs-upgrade.sql deleted file mode 100644 index 09a571818..000000000 --- a/sql-files/upgrades/rAthena-logs-upgrade.sql +++ /dev/null @@ -1,50 +0,0 @@ --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2013-2014 Hercules Dev Team --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - --- --- rAthena to Hercules log database upgrade query. --- This upgrades a FULLY UPGRADED rAthena to a FULLY UPGRADED Hercules --- Please don't use if either rAthena or Hercules launched a SQL update after last revision date of this file. --- Remember to make a backup before applying. --- We are not liable for any data loss this may cause. --- Apply in the same database you applied your logs.sql --- Last revised: July 22, 2014 20:45 GMT --- - --- Drop table `cashlog` since it's not used in Hercules --- Comment it if you wish to keep the table -DROP TABLE IF EXISTS `cashlog`; - --- Upgrades to table `mvplog` -ALTER TABLE `mvplog` MODIFY `prize` INT(11) NOT NULL DEFAULT '0'; - --- Upgrades to table `picklog` -ALTER TABLE `picklog` MODIFY `type` enum('M','P','L','T','V','S','N','C','A','R','G','E','B','O','I','X','D','U','K','Y','Z','W','Q','J','H','@','0','1','2') NOT NULL default 'P'; -ALTER TABLE `picklog` MODIFY `nameid` INT(11) NOT NULL DEFAULT '0'; -ALTER TABLE `picklog` MODIFY `card0` INT(11) NOT NULL DEFAULT '0'; -ALTER TABLE `picklog` MODIFY `card1` INT(11) NOT NULL DEFAULT '0'; -ALTER TABLE `picklog` MODIFY `card2` INT(11) NOT NULL DEFAULT '0'; -ALTER TABLE `picklog` MODIFY `card3` INT(11) NOT NULL DEFAULT '0'; -ALTER TABLE `atcommandlog` MODIFY `atcommand_date` DATETIME NULL; -ALTER TABLE `branchlog` MODIFY `branch_date` DATETIME NULL; -ALTER TABLE `chatlog` MODIFY `time` DATETIME NULL; -ALTER TABLE `loginlog` MODIFY `time` DATETIME NULL; -ALTER TABLE `mvplog` MODIFY `mvp_date` DATETIME NULL; -ALTER TABLE `npclog` MODIFY `npc_date` DATETIME NULL; -ALTER TABLE `picklog` MODIFY `time` DATETIME NULL; -ALTER TABLE `zenylog` MODIFY `time` DATETIME NULL; diff --git a/sql-files/upgrades/rAthena-main-upgrade.sql b/sql-files/upgrades/rAthena-main-upgrade.sql deleted file mode 100644 index 5dd6111a5..000000000 --- a/sql-files/upgrades/rAthena-main-upgrade.sql +++ /dev/null @@ -1,352 +0,0 @@ --- This file is part of Hercules. --- http://herc.ws - http://github.com/HerculesWS/Hercules --- --- Copyright (C) 2013-2014 Hercules Dev Team --- --- Hercules is free software: you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation, either version 3 of the License, or --- (at your option) any later version. --- --- This program is distributed in the hope that it will be useful, --- but WITHOUT ANY WARRANTY; without even the implied warranty of --- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --- GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License --- along with this program. If not, see <http://www.gnu.org/licenses/>. - --- --- rAthena to Hercules main database upgrade query. --- This upgrades a FULLY UPGRADED rAthena to a FULLY UPGRADED Hercules --- Please don't use if either rAthena or Hercules launched a SQL update after last revision date of this file. --- Remember to make a backup before applying. --- We are not liable for any data loss this may cause. --- Apply in the same database you applied your main.sql --- Last revised: July 22, 2014 21:45 GMT --- - --- Drop table contents from `sc_data` since we use a different status order than rAthena --- /!\ WARNING /!\ This will remove _ALL_ of the status effects active on the server --- You can disable this, but this is a SECURITY MEASURE --- This will remove even jailed status from users! -TRUNCATE TABLE `sc_data`; - --- Drop table `skillcooldown` since it's not used in Hercules -DROP TABLE IF EXISTS `skillcooldown`; - --- Upgrades for table `auction` -ALTER TABLE `auction` MODIFY `nameid` INT(11) NOT NULL DEFAULT '0', - MODIFY `card0` SMALLINT(11) NOT NULL DEFAULT '0', - MODIFY `card1` SMALLINT(11) NOT NULL DEFAULT '0', - MODIFY `card2` SMALLINT(11) NOT NULL DEFAULT '0', - MODIFY `card3` SMALLINT(11) NOT NULL DEFAULT '0'; - --- Upgrades for table `cart_inventory` -ALTER TABLE `cart_inventory` MODIFY `nameid` INT(11) NOT NULL DEFAULT '0', - MODIFY `card0` SMALLINT(11) NOT NULL DEFAULT '0', - MODIFY `card1` SMALLINT(11) NOT NULL DEFAULT '0', - MODIFY `card2` SMALLINT(11) NOT NULL DEFAULT '0', - MODIFY `card3` SMALLINT(11) NOT NULL DEFAULT '0', - MODIFY `bound` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0'; - --- Upgrades for table `char` -ALTER TABLE `char` CHANGE `moves` `slotchange` SMALLINT(3) UNSIGNED NOT NULL DEFAULT '0', - ADD `char_opt` INT(11) UNSIGNED NOT NULL DEFAULT '0' AFTER `slotchange`, - MODIFY `font` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0' AFTER `char_opt`, - ADD `uniqueitem_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0' AFTER `unban_time`; - --- Upgrades for table `charlog` -ALTER TABLE `charlog` ADD COLUMN `char_id` INT(11) UNSIGNED NOT NULL DEFAULT '0' AFTER `account_id`; - --- Upgrades for table `guild_storage` -ALTER TABLE `guild_storage` MODIFY `nameid` INT(11) NOT NULL DEFAULT '0', - MODIFY `card0` SMALLINT(11) NOT NULL DEFAULT '0', - MODIFY `card1` SMALLINT(11) NOT NULL DEFAULT '0', - MODIFY `card2` SMALLINT(11) NOT NULL DEFAULT '0', - MODIFY `card3` SMALLINT(11) NOT NULL DEFAULT '0', - MODIFY `bound` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0'; - --- Upgrades for table `inventory` -ALTER TABLE `inventory` MODIFY `nameid` INT(11) NOT NULL DEFAULT '0', - MODIFY `card0` SMALLINT(11) NOT NULL DEFAULT '0', - MODIFY `card1` SMALLINT(11) NOT NULL DEFAULT '0', - MODIFY `card2` SMALLINT(11) NOT NULL DEFAULT '0', - MODIFY `card3` SMALLINT(11) NOT NULL DEFAULT '0', - MODIFY `bound` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0'; - --- Login table will be upgraded at a later point on this file --- so that we can save the bank vault. - --- Upgrades for table `mail` -ALTER TABLE `mail` MODIFY `nameid` INT(11) NOT NULL DEFAULT '0', - MODIFY `card0` SMALLINT(11) NOT NULL DEFAULT '0', - MODIFY `card1` SMALLINT(11) NOT NULL DEFAULT '0', - MODIFY `card2` SMALLINT(11) NOT NULL DEFAULT '0', - MODIFY `card3` SMALLINT(11) NOT NULL DEFAULT '0'; - --- Upgrades for table `mapreg` -ALTER TABLE `mapreg` MODIFY `varname` VARCHAR(32) BINARY NOT NULL, - DROP KEY `varname`, - DROP KEY `index`, - ADD PRIMARY KEY (`varname`,`index`); - --- Upgrades for table `pet` -ALTER TABLE `pet` MODIFY `egg_id` SMALLINT(11) UNSIGNED NOT NULL DEFAULT '0'; - - --- Upgrades for table `sc_data` -ALTER TABLE `sc_data` ADD PRIMARY KEY (`account_id`,`char_id`,`type`); - --- --- Table structure for table `sql_updates` --- - -CREATE TABLE IF NOT EXISTS `sql_updates` ( - `timestamp` INT(11) UNSIGNED NOT NULL, - `ignored` ENUM('Yes','No') NOT NULL DEFAULT 'No', - PRIMARY KEY (`timestamp`) -) ENGINE=MyISAM; - --- Existent updates to enter -INSERT INTO `sql_updates` (`timestamp`) VALUES (1360858500); -- 2013-02-14--16-15.sql -INSERT INTO `sql_updates` (`timestamp`) VALUES (1360951560); -- 2013-02-15--18-06.sql -INSERT INTO `sql_updates` (`timestamp`) VALUES (1362445531); -- 2013-03-05--01-05.sql -INSERT INTO `sql_updates` (`timestamp`) VALUES (1362528000); -- 2013-03-06--00-00.sql -INSERT INTO `sql_updates` (`timestamp`) VALUES (1362794218); -- 2013-03-09--01-56.sql -INSERT INTO `sql_updates` (`timestamp`) VALUES (1364409316); -- 2013-03-27--18-35.sql -INSERT INTO `sql_updates` (`timestamp`) VALUES (1366075474); -- 2013-04-16--01-24.sql -INSERT INTO `sql_updates` (`timestamp`) VALUES (1366078541); -- 2013-04-16--02-15.sql -INSERT INTO `sql_updates` (`timestamp`) VALUES (1381354728); -- 2013-10-09--21-38.sql -INSERT INTO `sql_updates` (`timestamp`) VALUES (1381423003); -- 2013-10-10--16-36.sql -INSERT INTO `sql_updates` (`timestamp`) VALUES (1382892428); -- 2013-10-27--16-47.sql -INSERT INTO `sql_updates` (`timestamp`) VALUES (1383162785); -- 2013-10-30--19-53.sql -INSERT INTO `sql_updates` (`timestamp`) VALUES (1383167577); -- 2013-10-30--21-12.sql -INSERT INTO `sql_updates` (`timestamp`) VALUES (1383205740); -- 2013-10-31--07-49.sql -INSERT INTO `sql_updates` (`timestamp`) VALUES (1383955424); -- 2013-11-09--00-03.sql -INSERT INTO `sql_updates` (`timestamp`) VALUES (1384473995); -- 2013-11-15--00-06.sql -INSERT INTO `sql_updates` (`timestamp`) VALUES (1384545461); -- 2013-11-15--19-57.sql -INSERT INTO `sql_updates` (`timestamp`) VALUES (1384588175); -- 2013-11-16--07-49.sql -INSERT INTO `sql_updates` (`timestamp`) VALUES (1384763034); -- 2013-11-18--08-23.sql -INSERT INTO `sql_updates` (`timestamp`) VALUES (1387844126); -- 2013-12-24--00-15.sql -INSERT INTO `sql_updates` (`timestamp`) VALUES (1388854043); -- 2014-01-04--16-47.sql -INSERT INTO `sql_updates` (`timestamp`) VALUES (1389028967); -- 2014-01-06--17-22.sql -INSERT INTO `sql_updates` (`timestamp`) VALUES (1392832626); -- 2014-02-19--17-57.sql -INSERT INTO `sql_updates` (`timestamp`) VALUES (1395789302); -- 2014-03-25--23-57.sql -INSERT INTO `sql_updates` (`timestamp`) VALUES (1396893866); -- 2014-04-07--22-04.sql -INSERT INTO `sql_updates` (`timestamp`) VALUES (1398477600); -- 2014-04-26--10-00.sql -INSERT INTO `sql_updates` (`timestamp`) VALUES (1400256139); -- 2014-05-17--00-06.sql - --- Updates to table `storage` -ALTER TABLE `storage` MODIFY `nameid` INT(11) NOT NULL DEFAULT '0', - MODIFY `card0` SMALLINT(11) NOT NULL DEFAULT '0', - MODIFY `card1` SMALLINT(11) NOT NULL DEFAULT '0', - MODIFY `card2` SMALLINT(11) NOT NULL DEFAULT '0', - MODIFY `card3` SMALLINT(11) NOT NULL DEFAULT '0', - MODIFY `bound` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0'; - --- --- Table structure for table `account_data` --- - -CREATE TABLE IF NOT EXISTS `account_data` ( - `account_id` INT(11) UNSIGNED NOT NULL DEFAULT '0', - `bank_vault` INT(11) UNSIGNED NOT NULL DEFAULT '0', - `base_exp` TINYINT( 4 ) UNSIGNED NOT NULL DEFAULT '100', - `base_drop` TINYINT( 4 ) UNSIGNED NOT NULL DEFAULT '100', - `base_death` TINYINT( 4 ) UNSIGNED NOT NULL DEFAULT '100', - PRIMARY KEY (`account_id`) -) ENGINE=MyISAM; - --- Saving bank_vault data from rAthena's login table --- to our account_data table. There may be some not working cases. -INSERT INTO `account_data` (`account_id`, `bank_vault`) SELECT `account_id`, `bank_vault` FROM `login` WHERE `bank_vault` > 0 ; - --- Upgrades for table `login` -ALTER TABLE `login` DROP COLUMN `vip_time`, - DROP COLUMN `old_group`, - DROP COLUMN `bank_vault`; - --- Drop table `bonus_script` since it's not used in Hercules -DROP TABLE IF EXISTS `bonus_script`; - --- --- Table structure for table `npc_market_data` --- - -CREATE TABLE IF NOT EXISTS `npc_market_data` ( - `name` VARCHAR(24) NOT NULL DEFAULT '', - `itemid` INT(11) UNSIGNED NOT NULL DEFAULT '0', - `amount` INT(11) UNSIGNED NOT NULL DEFAULT '0', - PRIMARY KEY (`name`,`itemid`) -) ENGINE=MyISAM; - --- Autotrade saving. Very special thanks to Dastgir Pojee! --- --- Vending Database Update --- - --- Vending_Items Update -ALTER TABLE `vending_items` - ADD `char_id` INT(11) NOT NULL DEFAULT '0' AFTER `index`; - -UPDATE `vending_items` v1, `vendings` v2 - SET v1.char_id = v2.char_id - WHERE v1.vending_id = v2.id; - -ALTER TABLE `vending_items` - DROP `vending_id`, - DROP `index`, - CHANGE `cartinventory_id` `itemkey` INT(11) NOT NULL DEFAULT '0', - MODIFY `amount` INT(11) NOT NULL DEFAULT '0', - MODIFY `price` INT(11) NOT NULL DEFAULT '0'; - -ALTER TABLE `vending_items` - ADD PRIMARY KEY ( `char_id`, `itemkey`); - -RENAME TABLE `vending_items` TO `autotrade_data`; - --- Vending Data Update -ALTER TABLE `vendings` - DROP `id`, - DROP `map`, - DROP `x`, - DROP `y`, - DROP `autotrade`; - -ALTER TABLE `vendings` - CHANGE `sex` `sex_ref` ENUM('F','M') CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT 'M'; - -ALTER TABLE `vendings` - MODIFY `account_id` INT(11) NOT NULL DEFAULT '0', - MODIFY `char_id` INT(11) NOT NULL DEFAULT '0', - ADD `sex` TINYINT(2) NOT NULL DEFAULT '0' AFTER `char_id`, - MODIFY `title` VARCHAR(80) NOT NULL DEFAULT 'Buy From Me!'; - -UPDATE `vendings` - SET `sex` = 0 - WHERE `sex_ref` = 'F'; - -UPDATE `vendings` - SET `sex` = 1 - WHERE `sex_ref` = 'M'; - -ALTER TABLE `vendings` DROP `sex_ref`; - -ALTER TABLE `vendings` ADD PRIMARY KEY( `account_id`, `char_id`); - -RENAME TABLE `vendings` TO `autotrade_merchants`; - --- Autotrade saving ended - - --- We don't support saving buyingstores yet... --- Comment next statement if you want to preserve them anyways -DROP TABLE IF EXISTS `buyingstores`, `buyingstore_items`; - - --- Saving contents of `global_reg_value` - --- --- Table structure for table `acc_reg_num_db` --- - -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; - - --- --- Table structure for table `acc_reg_str_db` --- - -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; - --- --- Table structure for table `char_reg_num_db` --- - -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; - --- --- Table structure for table `char_reg_str_db` --- - -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; - --- --- Table structure for table `global_acc_reg_num_db` --- - -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; - --- --- Table structure for table `global_acc_reg_str_db` --- - -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; - --- Saving the data -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 '%$'; - --- Dropping now useless table -DROP TABLE `global_reg_value`; - -ALTER TABLE `charlog` MODIFY `time` DATETIME NULL; -ALTER TABLE `interlog` MODIFY `time` DATETIME NULL; -ALTER TABLE `ipbanlist` MODIFY `btime` DATETIME NULL; -ALTER TABLE `ipbanlist` MODIFY `rtime` DATETIME NULL; -ALTER TABLE `login` MODIFY `lastlogin` DATETIME NULL; -ALTER TABLE `login` MODIFY `birthdate` DATE NULL; - -UPDATE `charlog` SET `time` = NULL WHERE `time` = '0000-00-00 00:00:00'; -UPDATE `interlog` SET `time` = NULL WHERE `time` = '0000-00-00 00:00:00'; -UPDATE `ipbanlist` SET `btime` = NULL WHERE `btime` = '0000-00-00 00:00:00'; -UPDATE `ipbanlist` SET `rtime` = NULL WHERE `rtime` = '0000-00-00 00:00:00'; -UPDATE `login` SET `lastlogin` = NULL WHERE `lastlogin` = '0000-00-00 00:00:00'; -UPDATE `login` SET `birthdate` = NULL WHERE `birthdate` = '0000-00-00'; |