Sha256: 02cb357e755852f8ceb3f262857de438fb9c185c24ab46d7d0518240fe1772c5

Contents?: true

Size: 561 Bytes

Versions: 2

Compression:

Stored size: 561 Bytes

Contents

class CreatePlayers < Sequel::Migration
  def up
    create_table(:players) do
      primary_key(:id)
      DateTime(:created_at)
      DateTime(:updated_at)
      foreign_key(:team_id, :table => :teams)
      String(:name, :limit => 100, :null => false)
      String(:position, :limit => 50)
      Integer(:number, :null => false)
      TrueClass(:retired, :default => false)
      TrueClass(:injured, :default => false)
      Date(:born_on)
      String(:notes, :text => true)
    end
  end

  def 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/sequel/004_create_players_migration.rb
merb-admin-0.8.3 spec/migrations/sequel/004_create_players_migration.rb