Sha256: c45bf38584cffbdb10c25517dbafb842214e0a0e23db7ea95be770aedaa8ada4
Contents?: true
Size: 750 Bytes
Versions: 2
Compression:
Stored size: 750 Bytes
Contents
class CreateTeamsMigration < ActiveRecord::Migration def self.up create_table :teams do |t| t.timestamps t.integer :league_id t.integer :division_id t.string :name, :limit => 50, :null => false t.string :logo_url, :limit => 255 t.string :manager, :limit => 100, :null => false t.string :ballpark, :limit => 100 t.string :mascot, :limit => 100 t.integer :founded t.integer :wins t.integer :losses t.float :win_percentage end add_index :teams, :division_id add_index :teams, :league_id add_index :teams, :name add_index :teams, :manager add_index :teams, :ballpark add_index :teams, :mascot end def self.down drop_table :teams end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
merb-admin-0.5.6 | schema/migrations/005_create_teams_migration.rb |
merb-admin-0.5.5 | schema/migrations/005_create_teams_migration.rb |