class HoboMigration34 < ActiveRecord::Migration
  def self.up
    change_column :users, :preferred_view, :string, :limit => 255, :default => :expanded

    add_column :payments, :company_id, :integer

    add_index :payments, [:company_id]
  end

  def self.down
    change_column :users, :preferred_view, :string, default: "expanded"

    remove_column :payments, :company_id

    remove_index :payments, :name => :index_payments_on_company_id rescue ActiveRecord::StatementInvalid
  end
end
