Class: CreateProductsTaxRates

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

Instance Method Summary collapse

Instance Method Details

#downObject



12
13
14
# File 'lib/forge/db/migrate/20130405172031_create_products_tax_rates.rb', line 12

def down
  drop_table "products_tax_rates"
end

#upObject



2
3
4
5
6
7
8
9
10
# File 'lib/forge/db/migrate/20130405172031_create_products_tax_rates.rb', line 2

def up
  create_table "products_tax_rates", :id => false, :force => true do |t|
    t.integer "product_id"
    t.integer "tax_rate_id"
  end

  add_index "products_tax_rates", ["product_id"], :name => "index_products_tax_rates_on_product_id"
  add_index "products_tax_rates", ["tax_rate_id"], :name => "index_products_tax_rates_on_tax_rate_id"
end