3scale/porta

View on GitHub
db/migrate/20081106175319_add_country_id_to_accounts.rb

Summary

Maintainability
A
0 mins
Test Coverage
class AddCountryIdToAccounts < ActiveRecord::Migration
  def self.up
    change_table :accounts do |t|
      t.remove :currency
      t.belongs_to :country
    end
  end

  def self.down
    change_table :accounts do |t|
      t.remove_belongs_to :country
      t.string :currency, :default => 'EUR'
    end
  end
end