# class CreateLeagues

### Public Instance Methods

change() click to toggle source

    # File db/migrate/20130217083733_create_leagues.rb, line 2
    def change
      create_table :leagues do |t|
        t.string :name
        t.boolean :private
        t.money :capital
        t.money :margin
        t.money :commission
        t.integer :member_limit
        t.integer :portfolios_count, :default => 0
        t.date :start_date
        t.date :end_date

        t.integer :creator_id

        t.timestamps
      end
      add_index :leagues, [:creator_id]
    end