diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2017-10-15 14:35:11 -0400 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2017-10-15 14:35:11 -0400 |
commit | 5e58948fbdd918f45b25e5a5330ba85481a6f75e (patch) | |
tree | b66b5e8330f141cd2522bf98bd5fbc925d3ce4aa /db/migrate/20171015171555_rename_pokemon_met_location.pokeviewer.rb | |
parent | 230a5014f895dedc6d16192e853f90cb18eb8703 (diff) | |
download | thoughts-5e58948fbdd918f45b25e5a5330ba85481a6f75e.tar.gz thoughts-5e58948fbdd918f45b25e5a5330ba85481a6f75e.tar.bz2 thoughts-5e58948fbdd918f45b25e5a5330ba85481a6f75e.zip |
Fixed two migration similar to previous
Diffstat (limited to 'db/migrate/20171015171555_rename_pokemon_met_location.pokeviewer.rb')
-rw-r--r-- | db/migrate/20171015171555_rename_pokemon_met_location.pokeviewer.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/db/migrate/20171015171555_rename_pokemon_met_location.pokeviewer.rb b/db/migrate/20171015171555_rename_pokemon_met_location.pokeviewer.rb index afb5987..fddeac0 100644 --- a/db/migrate/20171015171555_rename_pokemon_met_location.pokeviewer.rb +++ b/db/migrate/20171015171555_rename_pokemon_met_location.pokeviewer.rb | |||
@@ -1,7 +1,9 @@ | |||
1 | # This migration comes from pokeviewer (originally 20171003154157) | 1 | # This migration comes from pokeviewer (originally 20171003154157) |
2 | class RenamePokemonMetLocation < ActiveRecord::Migration[5.1] | 2 | class RenamePokemonMetLocation < ActiveRecord::Migration[5.1] |
3 | def up | 3 | def up |
4 | add_column :pokeviewer_pokemon, :location_id, :integer, null: true | 4 | change_table :pokeviewer_pokemon do |t| |
5 | t.references :location, null: true | ||
6 | end | ||
5 | 7 | ||
6 | add_foreign_key :pokeviewer_pokemon, :pokeviewer_locations, | 8 | add_foreign_key :pokeviewer_pokemon, :pokeviewer_locations, |
7 | column: :location_id | 9 | column: :location_id |