diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2017-10-15 14:33:56 -0400 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2017-10-15 14:33:56 -0400 |
commit | a273f1cd3e7e3ccbc420a1dd3b507dc372cf286a (patch) | |
tree | d4888acf3612a471fb943144c8c7c892a5e4c0be /db/migrate/20171003154157_rename_pokemon_met_location.rb | |
parent | 6def4c0a8ac99a489647b93c2a752b9803aefce1 (diff) | |
download | pokeviewer-a273f1cd3e7e3ccbc420a1dd3b507dc372cf286a.tar.gz pokeviewer-a273f1cd3e7e3ccbc420a1dd3b507dc372cf286a.tar.bz2 pokeviewer-a273f1cd3e7e3ccbc420a1dd3b507dc372cf286a.zip |
Fixed two more migrations, similar to previous
Diffstat (limited to 'db/migrate/20171003154157_rename_pokemon_met_location.rb')
-rw-r--r-- | db/migrate/20171003154157_rename_pokemon_met_location.rb | 4 |
1 files changed, 3 insertions, 1 deletions
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 @@ | |||
1 | class RenamePokemonMetLocation < ActiveRecord::Migration[5.1] | 1 | class RenamePokemonMetLocation < ActiveRecord::Migration[5.1] |
2 | def up | 2 | def up |
3 | add_column :pokeviewer_pokemon, :location_id, :integer, null: true | 3 | change_table :pokeviewer_pokemon do |t| |
4 | t.references :location, null: true | ||
5 | end | ||
4 | 6 | ||
5 | add_foreign_key :pokeviewer_pokemon, :pokeviewer_locations, | 7 | add_foreign_key :pokeviewer_pokemon, :pokeviewer_locations, |
6 | column: :location_id | 8 | column: :location_id |