Welcome to mirror list, hosted at ThFree Co, Russian Federation.

20230412203234_remove_clusters_applications_jupyter_oauth_fk.rb « post_migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 63474ebec36ba0624d0118df8b67acf25766d550 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# frozen_string_literal: true

class RemoveClustersApplicationsJupyterOauthFk < Gitlab::Database::Migration[2.1]
  disable_ddl_transaction!

  def up
    with_lock_retries do
      remove_foreign_key_if_exists(:clusters_applications_jupyter, column: :oauth_application_id)
    end
  end

  def down
    add_concurrent_foreign_key :clusters_applications_jupyter, :oauth_applications,
      column: :oauth_application_id, on_delete: :nullify, name: 'fk_rails_331f0aff78'
  end
end