You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: 20230804121704_remove_namespaces_user_details_enterprise_group_id_fk.rb
    path of file: ./repos/gitlabhq/db/post_migrate
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

class RemoveNamespacesUserDetailsEnterpriseGroupIdFk < Gitlab::Database::Migration[2.1]
  dis
    
  def up
    return unless foreign_key_exists?(:user_details, :namespaces, name: "fk_c53c794142")

    with_lock_retries do
      remove_foreign_key_if_exists(:user_details, :namespaces,
        name: "fk_c53c794142", reverse_lock_order: true)
    end
  end