about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2017-10-15 14:35:11 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2017-10-15 14:35:11 -0400
commit5e58948fbdd918f45b25e5a5330ba85481a6f75e (patch)
treeb66b5e8330f141cd2522bf98bd5fbc925d3ce4aa
parent230a5014f895dedc6d16192e853f90cb18eb8703 (diff)
downloadthoughts-5e58948fbdd918f45b25e5a5330ba85481a6f75e.tar.gz
thoughts-5e58948fbdd918f45b25e5a5330ba85481a6f75e.tar.bz2
thoughts-5e58948fbdd918f45b25e5a5330ba85481a6f75e.zip
Fixed two migration similar to previous
-rw-r--r--Gemfile.lock2
-rw-r--r--db/migrate/20171015171555_rename_pokemon_met_location.pokeviewer.rb4
-rw-r--r--db/migrate/20171015171559_add_type_and_ability_to_species.pokeviewer.rb4
3 files changed, 6 insertions, 4 deletions
diff --git a/Gemfile.lock b/Gemfile.lock index dcc8cef..79831a3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock
@@ -1,6 +1,6 @@
1GIT 1GIT
2 remote: https://github.com/hatkirby/pokeviewer.git 2 remote: https://github.com/hatkirby/pokeviewer.git
3 revision: 6def4c0a8ac99a489647b93c2a752b9803aefce1 3 revision: a273f1cd3e7e3ccbc420a1dd3b507dc372cf286a
4 specs: 4 specs:
5 pokeviewer (0.1.0) 5 pokeviewer (0.1.0)
6 activerecord-diff 6 activerecord-diff
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)
2class RenamePokemonMetLocation < ActiveRecord::Migration[5.1] 2class 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
diff --git a/db/migrate/20171015171559_add_type_and_ability_to_species.pokeviewer.rb b/db/migrate/20171015171559_add_type_and_ability_to_species.pokeviewer.rb index a7da236..4a990f4 100644 --- a/db/migrate/20171015171559_add_type_and_ability_to_species.pokeviewer.rb +++ b/db/migrate/20171015171559_add_type_and_ability_to_species.pokeviewer.rb
@@ -4,8 +4,8 @@ class AddTypeAndAbilityToSpecies < ActiveRecord::Migration[5.1]
4 change_table :pokeviewer_species do |t| 4 change_table :pokeviewer_species do |t|
5 t.string :type_1, null: false, default: "" 5 t.string :type_1, null: false, default: ""
6 t.string :type_2 6 t.string :type_2
7 t.integer :ability_1_id, null: false, default: 0 7 t.references :ability_1, null: false, default: 0
8 t.integer :ability_2_id 8 t.references :ability_2
9 end 9 end
10 10
11 change_column_default :pokeviewer_species, :type_1, nil 11 change_column_default :pokeviewer_species, :type_1, nil