Initial commit
This commit is contained in:
12
db/migrate/20180227163417_good_currency_foreign_key.rb
Normal file
12
db/migrate/20180227163417_good_currency_foreign_key.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
# encoding: UTF-8
|
||||
# frozen_string_literal: true
|
||||
|
||||
class GoodCurrencyForeignKey < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
%i[ account_versions accounts deposits fund_sources payment_addresses payment_transactions proofs withdraws ].each do |t|
|
||||
remove_index t, :currency if index_exists?(t, :currency)
|
||||
rename_column t, :currency, :currency_id
|
||||
add_index t, :currency_id
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user