debian-mirror-gitlab/db/post_migrate/20230412201611_remove_clusters_applications_jupyter_fk.rb
2023-06-20 00:43:36 +05:30

17 lines
444 B
Ruby

# frozen_string_literal: true
class RemoveClustersApplicationsJupyterFk < Gitlab::Database::Migration[2.1]
disable_ddl_transaction!
def up
with_lock_retries do
remove_foreign_key_if_exists(:clusters_applications_jupyter, column: :cluster_id)
end
end
def down
add_concurrent_foreign_key :clusters_applications_jupyter, :clusters,
column: :cluster_id, on_delete: :cascade, name: 'fk_rails_17df21c98c'
end
end