From a273f1cd3e7e3ccbc420a1dd3b507dc372cf286a Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sun, 15 Oct 2017 14:33:56 -0400 Subject: Fixed two more migrations, similar to previous --- db/migrate/20171003154157_rename_pokemon_met_location.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'db/migrate/20171003154157_rename_pokemon_met_location.rb') diff --git a/db/migrate/20171003154157_rename_pokemon_met_location.rb b/db/migrate/20171003154157_rename_pokemon_met_location.rb index 4ccba57..3d42d53 100644 --- a/db/migrate/20171003154157_rename_pokemon_met_location.rb +++ b/db/migrate/20171003154157_rename_pokemon_met_location.rb @@ -1,6 +1,8 @@ class RenamePokemonMetLocation < ActiveRecord::Migration[5.1] def up - add_column :pokeviewer_pokemon, :location_id, :integer, null: true + change_table :pokeviewer_pokemon do |t| + t.references :location, null: true + end add_foreign_key :pokeviewer_pokemon, :pokeviewer_locations, column: :location_id -- cgit 1.4.1