diff --git a/mapadroid/patcher/__init__.py b/mapadroid/patcher/__init__.py index 5ba6411ac..8059368f2 100644 --- a/mapadroid/patcher/__init__.py +++ b/mapadroid/patcher/__init__.py @@ -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') ]) diff --git a/mapadroid/patcher/extend_trs_quest_pogodroid_190.py b/mapadroid/patcher/extend_trs_quest_pogodroid_190.py new file mode 100644 index 000000000..556ef9099 --- /dev/null +++ b/mapadroid/patcher/extend_trs_quest_pogodroid_190.py @@ -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 diff --git a/scripts/SQL/rocketmap.sql b/scripts/SQL/rocketmap.sql index 0e0a3fc78..1d2b20757 100644 --- a/scripts/SQL/rocketmap.sql +++ b/scripts/SQL/rocketmap.sql @@ -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',