Commit 0cbec247 authored by Mayra Cabrera's avatar Mayra Cabrera

Merge branch 'validate-foreign-key-service-hooks' into 'master'

Validate foreign key on ServiceHooks

See merge request gitlab-org/gitlab!57483
parents fe41d72c e1a1b53b
---
title: Validate foreign key on ServiceHooks
merge_request: 57483
author:
type: other
# frozen_string_literal: true
class ValidateForeignKeyOnServiceHooks < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
CONSTRAINT_NAME = 'fk_d47999a98a'
def up
validate_foreign_key :web_hooks, :service_id, name: CONSTRAINT_NAME
end
def down
# no-op
end
end
27fcdd54a21d554e44df621e409b81fe248e00851c856d315f4f64b463c7a5b7
\ No newline at end of file
...@@ -25195,7 +25195,7 @@ ALTER TABLE ONLY ci_builds ...@@ -25195,7 +25195,7 @@ ALTER TABLE ONLY ci_builds
ADD CONSTRAINT fk_d3130c9a7f FOREIGN KEY (commit_id) REFERENCES ci_pipelines(id) ON DELETE CASCADE; ADD CONSTRAINT fk_d3130c9a7f FOREIGN KEY (commit_id) REFERENCES ci_pipelines(id) ON DELETE CASCADE;
ALTER TABLE ONLY web_hooks ALTER TABLE ONLY web_hooks
ADD CONSTRAINT fk_d47999a98a FOREIGN KEY (service_id) REFERENCES services(id) ON DELETE CASCADE NOT VALID; ADD CONSTRAINT fk_d47999a98a FOREIGN KEY (service_id) REFERENCES services(id) ON DELETE CASCADE;
ALTER TABLE ONLY ci_sources_pipelines ALTER TABLE ONLY ci_sources_pipelines
ADD CONSTRAINT fk_d4e29af7d7 FOREIGN KEY (source_pipeline_id) REFERENCES ci_pipelines(id) ON DELETE CASCADE; ADD CONSTRAINT fk_d4e29af7d7 FOREIGN KEY (source_pipeline_id) REFERENCES ci_pipelines(id) ON DELETE CASCADE;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment