class CreateCredits < ActiveRecord::Migration
  def change
    create_table :credits do |t|
    	t.belongs_to :customer, index: true
    	t.belongs_to :pointsale, index: true
    	t.belongs_to :sale, index: true   
    	t.decimal :total, precision: 10, scale:2, default: 0.00, null: false
    	t.decimal :rest, precision: 10, scale:2, default: 0.00, null: false
	    t.integer :status, null: false, default: 0
  		t.timestamps null: false
    end
  end
end
