From 1ae9860698a33b47eb2d77acbcb7ad28a8edc7c6 Mon Sep 17 00:00:00 2001 From: David Gay Date: Wed, 9 Jun 2021 21:06:56 -0400 Subject: Fix spelling of laboratory --- db/migrate/20210605223042_rename_pig_iron_ingots.rb | 6 +++--- db/migrate/20210610010413_fix_spelling_of_laboratory.rb | 7 +++++++ 2 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 db/migrate/20210610010413_fix_spelling_of_laboratory.rb (limited to 'db/migrate') diff --git a/db/migrate/20210605223042_rename_pig_iron_ingots.rb b/db/migrate/20210605223042_rename_pig_iron_ingots.rb index 8f38c7c..df87aef 100644 --- a/db/migrate/20210605223042_rename_pig_iron_ingots.rb +++ b/db/migrate/20210605223042_rename_pig_iron_ingots.rb @@ -1,7 +1,7 @@ class RenamePigIronIngots < ActiveRecord::Migration[6.1] def change - Item.find_by_gid("pig_iron_ingot").update(gid: "crude_iron_ingot") - Activity.find_by_gid("craft_pig_iron_ingot").update(gid: "craft_crude_iron_ingot") - Activity.find_by_gid("craft_purify_pig_iron_ingot").update(gid: "craft_purify_crude_iron_ingot") + Item.find_by_gid("pig_iron_ingot")&.update(gid: "crude_iron_ingot") + Activity.find_by_gid("craft_pig_iron_ingot")&.update(gid: "craft_crude_iron_ingot") + Activity.find_by_gid("craft_purify_pig_iron_ingot")&.update(gid: "craft_purify_crude_iron_ingot") end end diff --git a/db/migrate/20210610010413_fix_spelling_of_laboratory.rb b/db/migrate/20210610010413_fix_spelling_of_laboratory.rb new file mode 100644 index 0000000..169608d --- /dev/null +++ b/db/migrate/20210610010413_fix_spelling_of_laboratory.rb @@ -0,0 +1,7 @@ +class FixSpellingOfLaboratory < ActiveRecord::Migration[6.1] + def change + HearthAmenity.find_by_gid("labratory")&.update(gid: "laboratory") + Activity.find_by_gid("construct_labratory_level1")&.update(gid: "construct_laboratory_level1") + Activity.find_by_gid("construct_labratory_level2")&.update(gid: "construct_laboratory_level2") + end +end -- cgit v1.2.3