Class: CreateTaxRates

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/forge/db/migrate/20130405172035_create_tax_rates.rb

Instance Method Summary collapse

Instance Method Details

#downObject



16
17
18
# File 'lib/forge/db/migrate/20130405172035_create_tax_rates.rb', line 16

def down
  drop_table :tax_rates
end

#upObject



2
3
4
5
6
7
8
9
10
11
12
13
14
# File 'lib/forge/db/migrate/20130405172035_create_tax_rates.rb', line 2

def up
  create_table "tax_rates" do |t|
    t.string   "title"
    t.float    "rate",        :default => 0.0, :null => false
    t.integer  "country_id"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.integer  "province_id"
  end

  add_index "tax_rates", ["country_id"], :name => "index_tax_rates_on_country_id"
  add_index "tax_rates", ["province_id"], :name => "index_tax_rates_on_province_id"
end