Sha256: 9bdf1957ed43bd876100613d410b0704a92d25b68634cee76b99e3f8c6ce54fc

Contents?: true

Size: 340 Bytes

Versions: 4

Compression:

Stored size: 340 Bytes

Contents

class ExpensesChangeStates < ActiveRecord::Migration[6.1]
  def change
    Dorsale::ExpenseGun::Expense.where(state: "submitted").update_all(state: "pending")
    Dorsale::ExpenseGun::Expense.where(state: "accepted").update_all(state: "paid")
    Dorsale::ExpenseGun::Expense.where(state: "refused").update_all(state: "canceled")
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
dorsale-4.0.0 db/migrate/20210506070548_expenses_change_states.rb
dorsale-3.20.0 db/migrate/20210506070548_expenses_change_states.rb
dorsale-3.19.1 db/migrate/20210506070548_expenses_change_states.rb
dorsale-3.19.0 db/migrate/20210506070548_expenses_change_states.rb