Added migration to fix characters unable to login due to DashMelee ability change

This commit is contained in:
Ben Wallis 2020-07-10 17:35:32 +01:00
parent 72dd2850e3
commit 7f6c892cf0
2 changed files with 8 additions and 0 deletions

View File

@ -0,0 +1 @@
-- Nothing to undo since up.sql only fixes corrupt JSON in loadouts

View File

@ -0,0 +1,7 @@
-- This is a migration to fix loadouts that contain old versions of items with the DashMelee skill before the
-- energy_cost field was added to it in https://gitlab.com/veloren/veloren/-/merge_requests/1140
-- This missing field in the JSON prevents accounts with affected characters from being able log in due to JSON
-- deserialization failure.
UPDATE loadout
SET items = REPLACE(items, '{"DashMelee":{"buildup_duration"','{"DashMelee":{"energy_cost":700,"buildup_duration"')
WHERE items LIKE '%DashMelee%';