Sha256: 9a1ab92c6aca3ac8004c8600367f8f51668c1373208c3fe4dd6192002be700b7
Contents?: true
Size: 641 Bytes
Versions: 2
Compression:
Stored size: 641 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) 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
merb-admin-0.8.5 | spec/migrations/sequel/005_create_teams_migration.rb |
merb-admin-0.8.3 | spec/migrations/sequel/005_create_teams_migration.rb |