Initial commit

This commit is contained in:
Yaser
2026-08-13 19:50:53 +03:30
commit 38084458fe
879 changed files with 95198 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
# encoding: UTF-8
# frozen_string_literal: true
class MigrateStates < ActiveRecord::Migration[4.2]
def change
execute %{UPDATE deposits SET aasm_state = 'submitted' WHERE aasm_state = 'submitting'}
execute %{UPDATE deposits SET aasm_state = 'accepted' WHERE aasm_state = 'checked' OR aasm_state = 'warning'}
execute %{UPDATE deposits SET aasm_state = 'canceled' WHERE aasm_state = 'cancelled'}
execute %{UPDATE withdraws SET aasm_state = 'prepared' WHERE aasm_state = 'submitting'}
execute %{UPDATE withdraws SET aasm_state = 'suspected' WHERE aasm_state = 'suspect'}
execute %{UPDATE withdraws SET aasm_state = 'succeed' WHERE aasm_state = 'done'}
execute %{UPDATE withdraws SET aasm_state = 'canceled' WHERE aasm_state = 'cancelled'}
end
end