Files
sx-fc/db/migrate/20170627035218_create_payment_journals.rb
2017-10-23 11:38:10 +06:30

16 lines
632 B
Ruby
Executable File

class CreatePaymentJournals < ActiveRecord::Migration[5.1]
def change
create_table :payment_journals do |t|
t.string :payment_references,:null => false
t.string :remark
t.decimal :credit_amount, :precision => 10, :scale => 2, :null => false, :default => 0.00
t.decimal :debit_amount, :precision => 10, :scale => 2, :null => false, :default => 0.00
t.string :payment_method,:null => false, :default => "CASH"
t.string :payment_status,:null => false, :default => "NEW"
t.string :payment_method_references
t.integer :created_by, :null => false
t.timestamps
end
end
end