diff options
Diffstat (limited to 'sql-files/upgrades')
-rw-r--r-- | sql-files/upgrades/2017-03-15--14-29.sql | 8 | ||||
-rw-r--r-- | sql-files/upgrades/2018-12-14--01-02.sql | 24 | ||||
-rw-r--r-- | sql-files/upgrades/2018-12-29--07-51.sql | 29 | ||||
-rw-r--r-- | sql-files/upgrades/2019-04-08--21-52.sql | 29 | ||||
-rw-r--r-- | sql-files/upgrades/2019-04-25--02-12.sql | 24 | ||||
-rw-r--r-- | sql-files/upgrades/2019-05-09--18-07.sql | 22 | ||||
-rw-r--r-- | sql-files/upgrades/2019-08-08--19-43.sql | 95 | ||||
-rw-r--r-- | sql-files/upgrades/2019-10-05--19-01.sql | 28 | ||||
-rw-r--r-- | sql-files/upgrades/2019-10-12--14-21.sql | 23 | ||||
-rw-r--r-- | sql-files/upgrades/2019-11-22--23-58.sql | 23 | ||||
-rw-r--r-- | sql-files/upgrades/index.txt | 9 |
11 files changed, 310 insertions, 4 deletions
diff --git a/sql-files/upgrades/2017-03-15--14-29.sql b/sql-files/upgrades/2017-03-15--14-29.sql index 6e6044738..13306d73e 100644 --- a/sql-files/upgrades/2017-03-15--14-29.sql +++ b/sql-files/upgrades/2017-03-15--14-29.sql @@ -50,13 +50,13 @@ CREATE TABLE IF NOT EXISTS `rodex_items` ( 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_name` VARCHAR(30) COLLATE 'utf8_unicode_ci' NOT NULL, `sender_id` INT(11) NOT NULL, - `receiver_name` VARCHAR(30) NOT NULL COLLATE 'utf8_unicode_ci', + `receiver_name` VARCHAR(30) COLLATE 'utf8_unicode_ci' NOT NULL, `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', + `title` VARCHAR(50) COLLATE 'utf8_unicode_ci' NOT NULL, + `body` VARCHAR(510) COLLATE 'utf8_unicode_ci' NOT NULL, `zeny` BIGINT(20) NOT NULL, `type` TINYINT(8) UNSIGNED NOT NULL, `is_read` TINYINT(8) NOT NULL, diff --git a/sql-files/upgrades/2018-12-14--01-02.sql b/sql-files/upgrades/2018-12-14--01-02.sql new file mode 100644 index 000000000..7bcd583c2 --- /dev/null +++ b/sql-files/upgrades/2018-12-14--01-02.sql @@ -0,0 +1,24 @@ +#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 new file mode 100644 index 000000000..641179399 --- /dev/null +++ b/sql-files/upgrades/2018-12-29--07-51.sql @@ -0,0 +1,29 @@ +#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/2019-04-08--21-52.sql b/sql-files/upgrades/2019-04-08--21-52.sql new file mode 100644 index 000000000..bd015acf8 --- /dev/null +++ b/sql-files/upgrades/2019-04-08--21-52.sql @@ -0,0 +1,29 @@ +#1554760320 + +-- This file is part of Hercules. +-- http://herc.ws - http://github.com/HerculesWS/Hercules +-- +-- Copyright (C) 2013-2019 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 `auction` SET `card3` = `card2` >> 16, `card2` = `card2` % 65536 WHERE `card2` > 65536 AND (`card0` = 255 OR `card0` = 254); +UPDATE `cart_inventory` SET `card3` = `card2` >> 16, `card2` = `card2` % 65536 WHERE `card2` > 65536 AND (`card0` = 255 OR `card0` = 254); +UPDATE `inventory` SET `card3` = `card2` >> 16, `card2` = `card2` % 65536 WHERE `card2` > 65536 AND (`card0` = 255 OR `card0` = 254); +UPDATE `guild_storage` SET `card3` = `card2` >> 16, `card2` = `card2` % 65536 WHERE `card2` > 65536 AND (`card0` = 255 OR `card0` = 254); +UPDATE `mail` SET `card3` = `card2` >> 16, `card2` = `card2` % 65536 WHERE `card2` > 65536 AND (`card0` = 255 OR `card0` = 254); +UPDATE `rodex_items` SET `card3` = `card2` >> 16, `card2` = `card2` % 65536 WHERE `card2` > 65536 AND (`card0` = 255 OR `card0` = 254); +UPDATE `storage` SET `card3` = `card2` >> 16, `card2` = `card2` % 65536 WHERE `card2` > 65536 AND (`card0` = 255 OR `card0` = 254); + +INSERT INTO `sql_updates` (`timestamp`, `ignored`) VALUES (1554760320, 'No'); diff --git a/sql-files/upgrades/2019-04-25--02-12.sql b/sql-files/upgrades/2019-04-25--02-12.sql new file mode 100644 index 000000000..64abe45b6 --- /dev/null +++ b/sql-files/upgrades/2019-04-25--02-12.sql @@ -0,0 +1,24 @@ +#1556147483 + +-- This file is part of Hercules. +-- http://herc.ws - http://github.com/HerculesWS/Hercules +-- +-- Copyright (C) 2013-2019 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/>. + +TRUNCATE TABLE `guild_expulsion`; +ALTER TABLE `guild_expulsion` ADD `char_id` INT(11) UNSIGNED NOT NULL DEFAULT '0' AFTER `account_id`; + +INSERT INTO `sql_updates` (`timestamp`) VALUES (1556147483); diff --git a/sql-files/upgrades/2019-05-09--18-07.sql b/sql-files/upgrades/2019-05-09--18-07.sql new file mode 100644 index 000000000..96d80c29c --- /dev/null +++ b/sql-files/upgrades/2019-05-09--18-07.sql @@ -0,0 +1,22 @@ +#1557414445 + +-- 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_rowshift2` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0' AFTER `hotkey_rowshift`; +INSERT INTO `sql_updates` (`timestamp`) VALUES (1557414445); diff --git a/sql-files/upgrades/2019-08-08--19-43.sql b/sql-files/upgrades/2019-08-08--19-43.sql new file mode 100644 index 000000000..35faf4ace --- /dev/null +++ b/sql-files/upgrades/2019-08-08--19-43.sql @@ -0,0 +1,95 @@ +#1565293394 + +-- This file is part of Hercules. +-- http://herc.ws - http://github.com/HerculesWS/Hercules +-- +-- Copyright (C) 2019 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 `guild_castle` DROP PRIMARY KEY; +ALTER TABLE `guild_castle` ADD COLUMN `castle_name` VARCHAR(24) AFTER `castle_id`; +UPDATE `guild_castle` SET `castle_name` = 'aldeg_cas01' WHERE castle_id = 0; +UPDATE `guild_castle` SET `castle_name` = 'aldeg_cas02' WHERE castle_id = 1; +UPDATE `guild_castle` SET `castle_name` = 'aldeg_cas03' WHERE castle_id = 2; +UPDATE `guild_castle` SET `castle_name` = 'aldeg_cas04' WHERE castle_id = 3; +UPDATE `guild_castle` SET `castle_name` = 'aldeg_cas05' WHERE castle_id = 4; +UPDATE `guild_castle` SET `castle_name` = 'gefg_cas01' WHERE castle_id = 5; +UPDATE `guild_castle` SET `castle_name` = 'gefg_cas02' WHERE castle_id = 6; +UPDATE `guild_castle` SET `castle_name` = 'gefg_cas03' WHERE castle_id = 7; +UPDATE `guild_castle` SET `castle_name` = 'gefg_cas04' WHERE castle_id = 8; +UPDATE `guild_castle` SET `castle_name` = 'gefg_cas05' WHERE castle_id = 9; +UPDATE `guild_castle` SET `castle_name` = 'payg_cas01' WHERE castle_id = 10; +UPDATE `guild_castle` SET `castle_name` = 'payg_cas02' WHERE castle_id = 11; +UPDATE `guild_castle` SET `castle_name` = 'payg_cas03' WHERE castle_id = 12; +UPDATE `guild_castle` SET `castle_name` = 'payg_cas04' WHERE castle_id = 13; +UPDATE `guild_castle` SET `castle_name` = 'payg_cas05' WHERE castle_id = 14; +UPDATE `guild_castle` SET `castle_name` = 'prtg_cas01' WHERE castle_id = 15; +UPDATE `guild_castle` SET `castle_name` = 'prtg_cas02' WHERE castle_id = 16; +UPDATE `guild_castle` SET `castle_name` = 'prtg_cas03' WHERE castle_id = 17; +UPDATE `guild_castle` SET `castle_name` = 'prtg_cas04' WHERE castle_id = 18; +UPDATE `guild_castle` SET `castle_name` = 'prtg_cas05' WHERE castle_id = 19; +UPDATE `guild_castle` SET `castle_name` = 'nguild_alde' WHERE castle_id = 20; +UPDATE `guild_castle` SET `castle_name` = 'nguild_gef' WHERE castle_id = 21; +UPDATE `guild_castle` SET `castle_name` = 'nguild_pay' WHERE castle_id = 22; +UPDATE `guild_castle` SET `castle_name` = 'nguild_prt' WHERE castle_id = 23; +UPDATE `guild_castle` SET `castle_name` = 'schg_cas01' WHERE castle_id = 24; +UPDATE `guild_castle` SET `castle_name` = 'schg_cas02' WHERE castle_id = 25; +UPDATE `guild_castle` SET `castle_name` = 'schg_cas03' WHERE castle_id = 26; +UPDATE `guild_castle` SET `castle_name` = 'schg_cas04' WHERE castle_id = 27; +UPDATE `guild_castle` SET `castle_name` = 'schg_cas05' WHERE castle_id = 28; +UPDATE `guild_castle` SET `castle_name` = 'arug_cas01' WHERE castle_id = 29; +UPDATE `guild_castle` SET `castle_name` = 'arug_cas02' WHERE castle_id = 30; +UPDATE `guild_castle` SET `castle_name` = 'arug_cas03' WHERE castle_id = 31; +UPDATE `guild_castle` SET `castle_name` = 'arug_cas04' WHERE castle_id = 32; +UPDATE `guild_castle` SET `castle_name` = 'arug_cas05' WHERE castle_id = 33; + +-- Change the castle ids +UPDATE `guild_castle` SET `castle_id` = 1 WHERE castle_name = 'prtg_cas01'; +UPDATE `guild_castle` SET `castle_id` = 2 WHERE castle_name = 'prtg_cas02'; +UPDATE `guild_castle` SET `castle_id` = 3 WHERE castle_name = 'prtg_cas03'; +UPDATE `guild_castle` SET `castle_id` = 4 WHERE castle_name = 'prtg_cas04'; +UPDATE `guild_castle` SET `castle_id` = 5 WHERE castle_name = 'prtg_cas05'; +UPDATE `guild_castle` SET `castle_id` = 6 WHERE castle_name = 'aldeg_cas01'; +UPDATE `guild_castle` SET `castle_id` = 7 WHERE castle_name = 'aldeg_cas02'; +UPDATE `guild_castle` SET `castle_id` = 8 WHERE castle_name = 'aldeg_cas03'; +UPDATE `guild_castle` SET `castle_id` = 9 WHERE castle_name = 'aldeg_cas04'; +UPDATE `guild_castle` SET `castle_id` = 10 WHERE castle_name = 'aldeg_cas05'; +UPDATE `guild_castle` SET `castle_id` = 11 WHERE castle_name = 'gefg_cas01'; +UPDATE `guild_castle` SET `castle_id` = 12 WHERE castle_name = 'gefg_cas02'; +UPDATE `guild_castle` SET `castle_id` = 13 WHERE castle_name = 'gefg_cas03'; +UPDATE `guild_castle` SET `castle_id` = 14 WHERE castle_name = 'gefg_cas04'; +UPDATE `guild_castle` SET `castle_id` = 15 WHERE castle_name = 'gefg_cas05'; +UPDATE `guild_castle` SET `castle_id` = 16 WHERE castle_name = 'payg_cas01'; +UPDATE `guild_castle` SET `castle_id` = 17 WHERE castle_name = 'payg_cas02'; +UPDATE `guild_castle` SET `castle_id` = 18 WHERE castle_name = 'payg_cas03'; +UPDATE `guild_castle` SET `castle_id` = 19 WHERE castle_name = 'payg_cas04'; +UPDATE `guild_castle` SET `castle_id` = 20 WHERE castle_name = 'payg_cas05'; +UPDATE `guild_castle` SET `castle_id` = 21 WHERE castle_name = 'arug_cas01'; +UPDATE `guild_castle` SET `castle_id` = 22 WHERE castle_name = 'arug_cas02'; +UPDATE `guild_castle` SET `castle_id` = 23 WHERE castle_name = 'arug_cas03'; +UPDATE `guild_castle` SET `castle_id` = 24 WHERE castle_name = 'arug_cas04'; +UPDATE `guild_castle` SET `castle_id` = 25 WHERE castle_name = 'arug_cas05'; +UPDATE `guild_castle` SET `castle_id` = 26 WHERE castle_name = 'schg_cas01'; +UPDATE `guild_castle` SET `castle_id` = 27 WHERE castle_name = 'schg_cas02'; +UPDATE `guild_castle` SET `castle_id` = 29 WHERE castle_name = 'schg_cas04'; +UPDATE `guild_castle` SET `castle_id` = 28 WHERE castle_name = 'schg_cas03'; +UPDATE `guild_castle` SET `castle_id` = 30 WHERE castle_name = 'schg_cas05'; +UPDATE `guild_castle` SET `castle_id` = 31 WHERE castle_name = 'nguild_prt'; +UPDATE `guild_castle` SET `castle_id` = 32 WHERE castle_name = 'nguild_alde'; +UPDATE `guild_castle` SET `castle_id` = 33 WHERE castle_name = 'nguild_gef'; +UPDATE `guild_castle` SET `castle_id` = 34 WHERE castle_name = 'nguild_pay'; +ALTER TABLE `guild_castle` ADD PRIMARY KEY (`castle_id`); +ALTER TABLE `guild_castle` DROP COLUMN `castle_name`; +INSERT INTO `sql_updates` (`timestamp`) VALUES (1565293394); diff --git a/sql-files/upgrades/2019-10-05--19-01.sql b/sql-files/upgrades/2019-10-05--19-01.sql new file mode 100644 index 000000000..4cb7c1c51 --- /dev/null +++ b/sql-files/upgrades/2019-10-05--19-01.sql @@ -0,0 +1,28 @@ +#1570309293 + +-- This file is part of Hercules. +-- http://herc.ws - http://github.com/HerculesWS/Hercules +-- +-- Copyright (C) 2019 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/>. + +-- Adds new total_tick column +ALTER TABLE `sc_data` ADD COLUMN `total_tick` INT(11) NOT NULL AFTER `tick`; + +-- Copy current tick to total_tick so players doesn't lose their current +-- status_changes, although those will still appear wrong until they end +UPDATE `sc_data` SET `total_tick` = `tick`; + +INSERT INTO `sql_updates` (`timestamp`) VALUES (1570309293); diff --git a/sql-files/upgrades/2019-10-12--14-21.sql b/sql-files/upgrades/2019-10-12--14-21.sql new file mode 100644 index 000000000..7da66e9b8 --- /dev/null +++ b/sql-files/upgrades/2019-10-12--14-21.sql @@ -0,0 +1,23 @@ +#1570870260 + +-- This file is part of Hercules. +-- http://herc.ws - http://github.com/HerculesWS/Hercules +-- +-- Copyright (C) 2019 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', '3') NOT NULL DEFAULT 'P'; +INSERT INTO `sql_updates` (`timestamp`) VALUES (1570870260); diff --git a/sql-files/upgrades/2019-11-22--23-58.sql b/sql-files/upgrades/2019-11-22--23-58.sql new file mode 100644 index 000000000..8d02fdfab --- /dev/null +++ b/sql-files/upgrades/2019-11-22--23-58.sql @@ -0,0 +1,23 @@ +#1574463539 + +-- This file is part of Hercules. +-- http://herc.ws - http://github.com/HerculesWS/Hercules +-- +-- Copyright (C) 2019 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 `ipbanlist` MODIFY `list` VARCHAR(13) NOT NULL DEFAULT ''; +INSERT INTO `sql_updates` (`timestamp`) VALUES (1574463539); diff --git a/sql-files/upgrades/index.txt b/sql-files/upgrades/index.txt index 2c88535cc..f7fc2ac79 100644 --- a/sql-files/upgrades/index.txt +++ b/sql-files/upgrades/index.txt @@ -50,3 +50,12 @@ 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 +2019-04-08--21-52.sql +2019-04-25--02-12.sql +2019-05-09--18-07.sql +2019-08-08--19-43.sql +2019-10-05--19-01.sql +2019-10-12--14-21.sql +2019-11-22--23-58.sql |