diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2018-09-21 13:23:29 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2018-09-21 13:23:29 +0300 |
commit | 9ab3e6093cef715533676f50c30880ff03716fee (patch) | |
tree | d4fe88cfc66328786ede5f5ab2d570b49f06959a /lib | |
parent | 8c2192943a5efc4d0a28c67b04bf9b979def66a1 (diff) | |
download | gitlab-ce-9ab3e6093cef715533676f50c30880ff03716fee.tar.gz |
Add mysql_compatible_index_length to migration helpersdz-migration-index-helper
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'lib')
-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 |