Sha256: dd901233500d8a74b3ae86c018c9e5114dfecbd01ab4f04ddfa65c9b33d5af31

Contents?: true

Size: 383 Bytes

Versions: 3

Compression:

Stored size: 383 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
    end
    add_index :teams, :division_id
    add_index :teams, :league_id
    add_index :teams, :name
  end

  def self.down
    drop_table :teams
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
merb-admin-0.4.8 schema/migrations/005_create_teams_migration.rb
merb-admin-0.4.7 schema/migrations/005_create_teams_migration.rb
merb-admin-0.4.6 schema/migrations/005_create_teams_migration.rb