diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-27 06:07:24 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-27 06:07:24 +0300 |
commit | 59c92e3adc265b4c5706ad1e154d9d480e04946b (patch) | |
tree | 78630f1ce95d3e3190856454a2b7e7a58ed298ab /db | |
parent | d6b0aec9b8801487055e096cfe96823424e6f745 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r-- | db/post_migrate/20231225070431_async_validate_finding_id_on_vulnerabilities.rb | 17 | ||||
-rw-r--r-- | db/schema_migrations/20231225070431 | 1 |
2 files changed, 18 insertions, 0 deletions
diff --git a/db/post_migrate/20231225070431_async_validate_finding_id_on_vulnerabilities.rb b/db/post_migrate/20231225070431_async_validate_finding_id_on_vulnerabilities.rb new file mode 100644 index 00000000000..dfab0d6eab0 --- /dev/null +++ b/db/post_migrate/20231225070431_async_validate_finding_id_on_vulnerabilities.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class AsyncValidateFindingIdOnVulnerabilities < Gitlab::Database::Migration[2.2] + # obtained by running `\d vulnerabilities` on https://console.postgres.ai + FK_NAME = :fk_4e64972902 + + milestone '16.8' + + # TODO: FK to be validated synchronously in https://gitlab.com/gitlab-org/gitlab/-/issues/425409 + def up + prepare_async_foreign_key_validation :vulnerabilities, :finding_id, name: FK_NAME + end + + def down + unprepare_async_foreign_key_validation :vulnerabilities, :finding_id, name: FK_NAME + end +end diff --git a/db/schema_migrations/20231225070431 b/db/schema_migrations/20231225070431 new file mode 100644 index 00000000000..7cbc466473b --- /dev/null +++ b/db/schema_migrations/20231225070431 @@ -0,0 +1 @@ +1298d9dd3c6b909a3129b5375477b466b7970347cf65d0654bf3076f87658fd0
\ No newline at end of file |