20170901071411_add_foreign_key_to_issue_author.rb 335 Bytes
Newer Older
1
class AddForeignKeyToIssueAuthor < ActiveRecord::Migration[4.2]
2 3 4 5 6 7 8 9 10 11 12 13 14
  include Gitlab::Database::MigrationHelpers

  DOWNTIME = false
  disable_ddl_transaction!

  def up
    add_concurrent_foreign_key(:issues, :users, column: :author_id, on_delete: :nullify)
  end

  def down
    remove_foreign_key(:issues, column: :author_id)
  end
end