Class: CreateInvoicingTaxRates

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/rails/generators/invoicing/tax_rate/templates/migration.rb

Instance Method Summary collapse

Instance Method Details

#changeObject


2
3
4
5
6
7
8
9
10
11
12
13
# File 'lib/rails/generators/invoicing/tax_rate/templates/migration.rb', line 2

def change
  create_table :invoicing_tax_rates do |t|
    t.string   :description
    t.decimal  :rate,           precision: 20, scale: 4
    t.datetime :valid_from,     null: false
    t.datetime :valid_until
    t.integer  :replaced_by_id
    t.boolean  :is_default

    t.timestamps
  end
end