class CreateCreditExpenses < ActiveRecord::Migration
  def change
    create_table :credit_expenses do |t|
      t.integer :value
      t.references :credit, index: true
      t.references :expense, index: true
      t.references :annonce_account, index: true
      
      t.timestamps null: false
    end
    add_foreign_key :credit_expenses, :credits
    add_foreign_key :credit_expenses, :expenses
  end
end
