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
path: root/lib
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2018-09-28 17:09:31 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2018-09-28 17:09:31 +0300
commitab6b4488033e6291ba1c2295ea87884ff37e7508 (patch)
tree7b9b49f1d277141c63e29e9299a70410b43f28bf /lib
parent8ecb70eda861cd067f6ff036cb1ea683de32b2b0 (diff)
parent9ab3e6093cef715533676f50c30880ff03716fee (diff)
Merge branch 'dz-migration-index-helper' into 'master'
Add mysql_compatible_index_length to migration helpers Closes #50253 See merge request gitlab-org/gitlab-ce!21852
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/database/migration_helpers.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/gitlab/database/migration_helpers.rb b/lib/gitlab/database/migration_helpers.rb
index 7f012312819..30541ee3553 100644
--- a/lib/gitlab/database/migration_helpers.rb
+++ b/lib/gitlab/database/migration_helpers.rb
@@ -1073,6 +1073,10 @@ into similar problems in the future (e.g. when new tables are created).
connection.select_value(index_sql).to_i > 0
end
+
+ def mysql_compatible_index_length
+ Gitlab::Database.mysql? ? 20 : nil
+ end
end
end
end