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,15 @@
class EnumerizeWalletKind < ActiveRecord::Migration[4.2]
def change
id_kind_hash = Wallet.pluck(:id, :kind).to_h
remove_column :wallets, :kind
add_column :wallets, :kind, :integer, limit: 4, null: false, after: :address
Wallet.find_each { |w| w.update!(kind: id_kind_hash[w.id]) }
add_index :wallets, :status
add_index :wallets, :kind
add_index :wallets, :currency_id
add_index :wallets, %i[kind currency_id status]
end
end