debian-mirror-gitlab/db/migrate/20221225010106_create_remote_development_agent_config_agent_foreign_key.rb
2023-07-09 08:55:56 +05:30

17 lines
442 B
Ruby

# frozen_string_literal: true
class CreateRemoteDevelopmentAgentConfigAgentForeignKey < Gitlab::Database::Migration[2.1]
disable_ddl_transaction!
def up
add_concurrent_foreign_key :remote_development_agent_configs,
:cluster_agents, column: :cluster_agent_id, on_delete: :cascade
end
def down
with_lock_retries do
remove_foreign_key :remote_development_agent_configs, column: :cluster_agent_id
end
end
end