Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-31 18:07:53 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-31 18:07:53 +0300
commitd7a028e20d29b8c6d0e780ac168544dfbb712d3c (patch)
treef9fc9ea12e166aec6c4ffe476ba7a3566396b696 /db/migrate/20200326144443_add_labels_fk_to_jira_imports_table.rb
parent0d0cddc9ce20c5a7d8a2723d0aa620ca184a711a (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db/migrate/20200326144443_add_labels_fk_to_jira_imports_table.rb')
-rw-r--r--db/migrate/20200326144443_add_labels_fk_to_jira_imports_table.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/db/migrate/20200326144443_add_labels_fk_to_jira_imports_table.rb b/db/migrate/20200326144443_add_labels_fk_to_jira_imports_table.rb
new file mode 100644
index 00000000000..ead04100a96
--- /dev/null
+++ b/db/migrate/20200326144443_add_labels_fk_to_jira_imports_table.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+class AddLabelsFkToJiraImportsTable < ActiveRecord::Migration[6.0]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ def up
+ with_lock_retries do
+ add_foreign_key :jira_imports, :labels, on_delete: :nullify # rubocop:disable Migration/AddConcurrentForeignKey
+ end
+ end
+
+ def down
+ with_lock_retries do
+ remove_foreign_key :jira_imports, :labels
+ end
+ end
+end