Initial commit
This commit is contained in:
12
db/migrate/20200806143442_add_wallet_balance.rb
Normal file
12
db/migrate/20200806143442_add_wallet_balance.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
class AddWalletBalance < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
case ActiveRecord::Base.connection.adapter_name
|
||||
when 'Mysql2'
|
||||
add_column :wallets, :balance, :json, after: :settings_encrypted
|
||||
when 'PostgreSQL'
|
||||
add_column :wallets, :balance, :jsonb
|
||||
else
|
||||
raise "Unsupported adapter: #{ActiveRecord::Base.connection.adapter_name}"
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user