diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-06 14:28:26 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-06 14:28:26 +0300 |
commit | 7d5e6412bef7fd457e22532faf859e551f8196fc (patch) | |
tree | dc62b4a7a5fad8ba0ba260ae82e95f8e984f2398 /db/migrate/20200304121844_add_ci_sources_project_source_project_foreign_key.rb | |
parent | 8e94dad32b10edebf79285c083176c2b7005ef64 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db/migrate/20200304121844_add_ci_sources_project_source_project_foreign_key.rb')
-rw-r--r-- | db/migrate/20200304121844_add_ci_sources_project_source_project_foreign_key.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/db/migrate/20200304121844_add_ci_sources_project_source_project_foreign_key.rb b/db/migrate/20200304121844_add_ci_sources_project_source_project_foreign_key.rb new file mode 100644 index 00000000000..88bf835b9f1 --- /dev/null +++ b/db/migrate/20200304121844_add_ci_sources_project_source_project_foreign_key.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +class AddCiSourcesProjectSourceProjectForeignKey < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + def change + with_lock_retries do + add_foreign_key :ci_sources_projects, :projects, column: :source_project_id, on_delete: :cascade # rubocop:disable Migration/AddConcurrentForeignKey + end + end +end |