From 63260ad880bbb6007077ba072541818686a23873 Mon Sep 17 00:00:00 2001 From: Ben Wallis Date: Fri, 10 Jul 2020 17:35:32 +0100 Subject: [PATCH] Added migration to fix characters unable to login due to DashMelee ability change --- .../2020-07-10-162552_dash_melee_energy_cost_fix/down.sql | 1 + .../2020-07-10-162552_dash_melee_energy_cost_fix/up.sql | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 server/src/migrations/2020-07-10-162552_dash_melee_energy_cost_fix/down.sql create mode 100644 server/src/migrations/2020-07-10-162552_dash_melee_energy_cost_fix/up.sql diff --git a/server/src/migrations/2020-07-10-162552_dash_melee_energy_cost_fix/down.sql b/server/src/migrations/2020-07-10-162552_dash_melee_energy_cost_fix/down.sql new file mode 100644 index 0000000000..cf625d5a2c --- /dev/null +++ b/server/src/migrations/2020-07-10-162552_dash_melee_energy_cost_fix/down.sql @@ -0,0 +1 @@ +-- Nothing to undo since up.sql only fixes corrupt JSON in loadouts \ No newline at end of file diff --git a/server/src/migrations/2020-07-10-162552_dash_melee_energy_cost_fix/up.sql b/server/src/migrations/2020-07-10-162552_dash_melee_energy_cost_fix/up.sql new file mode 100644 index 0000000000..f1cc178835 --- /dev/null +++ b/server/src/migrations/2020-07-10-162552_dash_melee_energy_cost_fix/up.sql @@ -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%'; \ No newline at end of file