Class: CreateTaxes

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/reso/templates/create_taxes.rb

Instance Method Summary collapse

Instance Method Details

#changeObject



2
3
4
5
6
7
8
9
10
11
# File 'lib/generators/reso/templates/create_taxes.rb', line 2

def change
  create_table :taxes, options: 'DEFAULT CHARSET=utf8' do |t|
    t.integer :year
    t.decimal :amount, null: false
    t.string :description
    t.references :listing, index: true, null: false, foreign_key: true

    t.timestamps
  end
end