2023-07-12 17:47:08 +10:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2023-03-28 01:09:10 +11:00
|
|
|
class AddMovedToAccountIdToAccounts < ActiveRecord::Migration[5.2]
|
2017-11-19 05:39:02 +11:00
|
|
|
def change
|
|
|
|
add_column :accounts, :moved_to_account_id, :bigint, null: true, default: nil
|
2019-05-31 05:35:29 +10:00
|
|
|
safety_assured { add_foreign_key :accounts, :accounts, column: :moved_to_account_id, on_delete: :nullify }
|
2017-11-19 05:39:02 +11:00
|
|
|
end
|
|
|
|
end
|