class AddDeviseToCreditProducts < ActiveRecord::Migration
  def change
    add_reference :credit_products, :devise, index: true
    add_foreign_key :credit_products, :devises
    
    CreditProduct.all.update_all(:devise_id => 1)
  end
end
