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