Merge branch 'xvar/bricked-loadouts-fix' into 'master'

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

See merge request veloren/veloren!1192
This commit is contained in:
Marcel 2020-07-11 15:19:53 +00:00
commit a0b866e97b
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%';