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
