From 9ab3e6093cef715533676f50c30880ff03716fee Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Fri, 21 Sep 2018 13:23:29 +0300 Subject: Add mysql_compatible_index_length to migration helpers Signed-off-by: Dmitriy Zaporozhets --- lib/gitlab/database/migration_helpers.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib') 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 -- cgit v1.2.3