about summary refs log tree commit diff
path: root/db/migrate/20171118012443_add_moved_to_account_id_to_accounts.rb
blob: 586ef6f02d26dc92a7cc012bf98074585843a9cd (plain) (blame)
1
2
3
4
5
6
class AddMovedToAccountIdToAccounts < ActiveRecord::Migration[5.1]
  def change
    add_column :accounts, :moved_to_account_id, :bigint, null: true, default: nil
    safety_assured { add_foreign_key :accounts, :accounts, column: :moved_to_account_id, on_delete: :nullify }
  end
end