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:
authorLin Jen-Shin <godfat@godfat.org>2019-06-19 18:06:54 +0300
committerLin Jen-Shin <godfat@godfat.org>2019-06-19 18:06:54 +0300
commite999e1de7baadc34e7fccf76e76991a7adf31b0e (patch)
tree28869927628539bf8fb9c6a865286b0b985c8466
parent9df475eb368d81d90022b646fe9d7c0944d854f1 (diff)
parent6f5daf49d93a05a6121bcc83ca1da146dd537adf (diff)
Merge branch 'pj/fix-emacs-style' into 'master'
Fix syntax coloring on emacs See merge request gitlab-org/gitlab-ce!29844
-rw-r--r--lib/gitlab/database/migration_helpers.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/gitlab/database/migration_helpers.rb b/lib/gitlab/database/migration_helpers.rb
index 1b5cd0fbb07..0b12e862ded 100644
--- a/lib/gitlab/database/migration_helpers.rb
+++ b/lib/gitlab/database/migration_helpers.rb
@@ -225,7 +225,10 @@ module Gitlab
# here is based on Rails' foreign_key_name() method, which unfortunately
# is private so we can't rely on it directly.
def concurrent_foreign_key_name(table, column)
- "fk_#{Digest::SHA256.hexdigest("#{table}_#{column}_fk").first(10)}"
+ identifier = "#{table}_#{column}_fk"
+ hashed_identifier = Digest::SHA256.hexdigest(identifier).first(10)
+
+ "fk_#{hashed_identifier}"
end
# Long-running migrations may take more than the timeout allowed by