diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2018-09-28 17:09:31 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2018-09-28 17:09:31 +0300 |
commit | ab6b4488033e6291ba1c2295ea87884ff37e7508 (patch) | |
tree | 7b9b49f1d277141c63e29e9299a70410b43f28bf /lib/gitlab/database | |
parent | 8ecb70eda861cd067f6ff036cb1ea683de32b2b0 (diff) | |
parent | 9ab3e6093cef715533676f50c30880ff03716fee (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/gitlab/database')
-rw-r--r-- | lib/gitlab/database/migration_helpers.rb | 4 |
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 |