Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend trs_quest.quest_reward length #1062

Merged
merged 4 commits into from
Nov 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion mapadroid/patcher/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
(35, 'madrom_autoconfig'),
(36, 'pokemon_iv_index'),
(37, 'move_ptc_accounts'),
(38, 'remove_hatch_delay')
(38, 'remove_hatch_delay'),
(39, 'extend_trs_quest_pogodroid_190')
])


Expand Down
18 changes: 18 additions & 0 deletions mapadroid/patcher/extend_trs_quest_pogodroid_190.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from ._patch_base import PatchBase


class Patch(PatchBase):
name = 'Extend trs_quest.quest_reward length'
descr = 'New Protos, more data.'

def _execute(self):
alter_sql = """
ALTER TABLE `trs_quest`
MODIFY COLUMN `quest_reward` varchar(2560)
COLLATE utf8mb4_unicode_ci DEFAULT NULL;
"""
try:
self._db.execute(alter_sql, commit=True, raise_exec=True)
except Exception as e:
self._logger.exception("Unexpected error: {}", e)
self.issues = True
2 changes: 1 addition & 1 deletion scripts/SQL/rocketmap.sql
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ CREATE TABLE `trs_quest` (
`quest_item_amount` tinyint(2) NOT NULL,
`quest_target` tinyint(3) NOT NULL,
`quest_condition` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`quest_reward` varchar(1000) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`quest_reward` varchar(2560) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`quest_template` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`quest_task` varchar(150) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`quest_pokemon_form_id` smallint(6) NOT NULL DEFAULT '0',
Expand Down