diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-31 18:07:53 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-31 18:07:53 +0300 |
commit | d7a028e20d29b8c6d0e780ac168544dfbb712d3c (patch) | |
tree | f9fc9ea12e166aec6c4ffe476ba7a3566396b696 /db/migrate/20200326124443_add_projects_fk_to_jira_imports_table.rb | |
parent | 0d0cddc9ce20c5a7d8a2723d0aa620ca184a711a (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db/migrate/20200326124443_add_projects_fk_to_jira_imports_table.rb')
-rw-r--r-- | db/migrate/20200326124443_add_projects_fk_to_jira_imports_table.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/db/migrate/20200326124443_add_projects_fk_to_jira_imports_table.rb b/db/migrate/20200326124443_add_projects_fk_to_jira_imports_table.rb new file mode 100644 index 00000000000..6410f530b30 --- /dev/null +++ b/db/migrate/20200326124443_add_projects_fk_to_jira_imports_table.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +class AddProjectsFkToJiraImportsTable < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + def up + with_lock_retries do + add_foreign_key :jira_imports, :projects, on_delete: :cascade # rubocop:disable Migration/AddConcurrentForeignKey + end + end + + def down + with_lock_retries do + remove_foreign_key :jira_imports, :projects + end + end +end |