Sha256: 613faeb977f8bf68faa645410253997cd6894d59074d8e0136cae9956da03281

Contents?: true

Size: 501 Bytes

Versions: 2

Compression:

Stored size: 501 Bytes

Contents

class CreatePlayersMigration < ActiveRecord::Migration
  def self.up
    create_table(:players) do |t|
      t.timestamps
      t.integer(:team_id)
      t.string(:name, :limit => 100, :null => false)
      t.string(:position, :limit => 50)
      t.integer(:number, :null => false)
      t.boolean(:retired, :default => false)
      t.boolean(:injured, :default => false)
      t.date(:born_on)
      t.text(:notes)
    end
  end

  def self.down
    drop_table(:players)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
merb-admin-0.8.5 spec/migrations/activerecord/004_create_players_migration.rb
merb-admin-0.8.3 spec/migrations/activerecord/004_create_players_migration.rb