summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/gitlab/database/migration_helpers.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/gitlab/database/migration_helpers.rb b/lib/gitlab/database/migration_helpers.rb
index 593ee5d9568..927f9dad20b 100644
--- a/lib/gitlab/database/migration_helpers.rb
+++ b/lib/gitlab/database/migration_helpers.rb
@@ -20,6 +20,7 @@ module Gitlab
if Database.postgresql?
options = options.merge({ algorithm: :concurrently })
+ disable_statement_timeout
end
add_index(table_name, column_name, options)
@@ -140,8 +141,9 @@ module Gitlab
'in the body of your migration class'
end
+ disable_statement_timeout
+
transaction do
- disable_statement_timeout
add_column(table, column, type, default: nil)
# Changing the default before the update ensures any newly inserted