class CreateCreditPayments < ActiveRecord::Migration
  def change
    create_table :credit_payments do |t|
    	t.belongs_to :customer, index: true
    	t.belongs_to :credit, index: true   
    	t.belongs_to :cash_registers_move, index: true   
    	t.belongs_to :pointsale, index: true  
    	t.decimal :quantity, precision: 10, scale:2, default: 0.00, null: false
	    t.integer :status, null: false, default: 0
      	t.date :date_payment, null: false
  		t.timestamps null: false
    end
  end
end
