about summary refs log tree commit diff stats
path: root/db/migrate/20171004203404_add_pokeball_to_pokemon.rb
blob: d66a4ca34d467c209e8693ed573b1bcd3d36467a (plain) (blame)
1
2
3
4
5
6
7
8
9
class AddPokeballToPokemon < ActiveRecord::Migration[5.1]
  def change
    change_table :pokemon do |t|
      t.string :pokeball, null: false, default: :poke
    end

    change_column_default :pokemon, :pokeball, nil
  end
end