Sha256: fe628fa4119f92739b05095216afaadf6cc74b325d4c136b4617e78109b2d931

Contents?: true

Size: 1.02 KB

Versions: 3

Compression:

Stored size: 1.02 KB

Contents

require 'skr/db/migration_helpers'

class CreateSkrInvoices < ActiveRecord::Migration

    def change
        create_skr_table "invoices" do |t|
            t.skr_visible_id
            t.skr_reference :terms,            to_table: 'payment_terms'
            t.skr_reference :customer,         single: true
            t.skr_reference :location,         single: true
            t.skr_reference :sales_order,      single: true, null: true
            t.skr_reference :pick_ticket,      single: true, null: true
            t.skr_reference :shipping_address, to_table: 'addresses'
            t.skr_reference :billing_address,  to_table: 'addresses'
            t.skr_currency  :amount_paid,      null: false, default: 0.0
            t.string   "state",                null: false
            t.string   "hash_code",            null: false
            t.date     "invoice_date",         null: false
            t.string   "po_num"
            t.hstore   "options", default: {}
            t.skr_track_modifications
        end
    end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
stockor-0.1.8 db/migrate/20140327224000_create_skr_invoices.rb
stockor-0.1.7 db/migrate/20140327224000_create_skr_invoices.rb
stockor-0.1.5 db/migrate/20140327224000_create_skr_invoices.rb