Sha256: 445f9ec8c3edf1ae49e6632f6852ad376a7b368d9d618af227e2632f01c0d7c6

Contents?: true

Size: 593 Bytes

Versions: 2

Compression:

Stored size: 593 Bytes

Contents

class CreatePlayersMigration < ActiveRecord::Migration
  def self.up
    create_table :players do |t|
      t.timestamps
      t.datetime :deleted_at
      t.integer :team_id
      t.string :name, :limit => 100, :null => false
      t.string :position, :limit => 50
      t.integer :number
      t.float :batting_average, :default => 0.0
      t.boolean :retired, :default => false
      t.boolean :injured, :default => false
      t.date :born_on
      t.timestamp :wake_at
      t.text :notes
    end
    add_index :players, :team_id
  end

  def self.down
    drop_table :players
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
merb-admin-0.4.8 schema/migrations/004_create_players_migration.rb
merb-admin-0.4.7 schema/migrations/004_create_players_migration.rb