Skip to content

Commit

Permalink
Extend trs_quest.quest_reward length (#1062)
Browse files Browse the repository at this point in the history
* Create extend_trs_quest_pogodroid_190.py

* Update __init__.py

* Update extend_trs_quest_pogodroid_190.py

one more empty line for Travis

* Update rocketmap.sql
  • Loading branch information
JabLuszko authored Nov 29, 2020
1 parent ed8608f commit 43f044c
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
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

0 comments on commit 43f044c

Please sign in to comment.