From 7e4b9ea0c23eb660ab36a6114a7a3046d8f1c5f6 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sat, 13 Jan 2018 16:01:51 -0500 Subject: Moved species from Pokémon to revision MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The migration will set all of the revisions of each Pokémon to have the species that that Pokémon was set to. If reversed, the migration sets the Pokémon's species to the first revision's species, which mimics the behavior of the engine from before this change, but do note that running the migration backwards like this can lose data. This change slightly affects the loading time of the front page. See #2. refs #3 --- test/dummy/db/schema.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/dummy/db/schema.rb b/test/dummy/db/schema.rb index a527d06..9752892 100644 --- a/test/dummy/db/schema.rb +++ b/test/dummy/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20171011015648) do +ActiveRecord::Schema.define(version: 20180113200119) do create_table "pokeviewer_abilities", force: :cascade do |t| t.string "name", limit: 191, null: false @@ -58,7 +58,6 @@ ActiveRecord::Schema.define(version: 20171011015648) do create_table "pokeviewer_pokemon", force: :cascade do |t| t.string "uuid", limit: 191, null: false - t.integer "species_id", null: false t.integer "trainer_id" t.string "key", limit: 191 t.string "ot_name", null: false @@ -78,7 +77,6 @@ ActiveRecord::Schema.define(version: 20171011015648) do t.integer "location_id" t.string "pokeball", null: false t.index ["key"], name: "index_pokeviewer_pokemon_on_key", unique: true - t.index ["species_id"], name: "index_pokeviewer_pokemon_on_species_id" t.index ["trainer_id"], name: "index_pokeviewer_pokemon_on_trainer_id" t.index ["uuid"], name: "index_pokeviewer_pokemon_on_uuid", unique: true end @@ -129,12 +127,14 @@ ActiveRecord::Schema.define(version: 20171011015648) do t.boolean "national_ribbon", default: false t.boolean "earth_ribbon", default: false t.boolean "world_ribbon", default: false + t.integer "species_id", null: false t.index ["move_1_id"], name: "index_pokeviewer_revisions_on_move_1_id" t.index ["move_2_id"], name: "index_pokeviewer_revisions_on_move_2_id" t.index ["move_3_id"], name: "index_pokeviewer_revisions_on_move_3_id" t.index ["move_4_id"], name: "index_pokeviewer_revisions_on_move_4_id" t.index ["pokemon_id", "sequential_id"], name: "index_pokeviewer_revisions_on_pokemon_id_and_sequential_id", unique: true t.index ["pokemon_id"], name: "index_pokeviewer_revisions_on_pokemon_id" + t.index ["species_id"], name: "index_pokeviewer_revisions_on_species_id" end create_table "pokeviewer_species", force: :cascade do |t| -- cgit 1.4.1