Sha256: b928474c86c19172c864e47d9fbf60996558d9a0616ec0c561694ed0179f6ea5

Contents?: true

Size: 633 Bytes

Versions: 5

Compression:

Stored size: 633 Bytes

Contents

class CreateTeams < Sequel::Migration
  def up
    create_table(:teams) do
      primary_key(:id)
      DateTime(:created_at)
      DateTime(:updated_at)
      foreign_key(:league_id, :table => :leagues)
      foreign_key(:division_id, :table => :divisions)
      String(:name, :limit => 50, :null => false)
      String(:logo_url, :limit => 255)
      String(:manager, :limit => 100, :null => false)
      String(:ballpark, :limit => 100)
      String(:mascot, :limit => 100)
      Integer(:founded)
      Integer(:wins)
      Integer(:losses)
      Float(:win_percentage)
    end
  end

  def down
    drop_table(:teams)
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
merb-admin-0.6.4 spec/migrations/sequel/005_create_teams_migration.rb
merb-admin-0.6.3 spec/migrations/sequel/005_create_teams_migration.rb
merb-admin-0.6.2 spec/migrations/sequel/005_create_teams_migration.rb
merb-admin-0.6.1 spec/migrations/sequel/005_create_teams_migration.rb
merb-admin-0.6.0 spec/migrations/sequel/005_create_teams_migration.rb