class Player < ActiveRecord::Base; end

class CreatePlayers < ActiveRecord::Migration
  def self.up
    create_table :players do |t|
      t.column :title, :string
      t.column :first_name, :string
      t.column :last_name, :string
      t.column :standing, :integer
      t.column :elo_rating, :integer
    end
    
    Player.create(
      :title      => 'GM',
      :first_name => 'Veselin',
      :last_name  => 'Topalov',
      :standing   => 1,
      :elo_rating => 2813
    )
    
    Player.create(
      :title      => 'GM',
      :first_name => 'Viswanathan',
      :last_name  => 'Anand',
      :standing   => 2,
      :elo_rating => 2779
    )    
  end

  def self.down
    drop_table :players
  end
end