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
diff options
context:
space:
mode:
authorGabriel Mazetto <brodock@gmail.com>2018-08-11 02:45:46 +0300
committerGabriel Mazetto <brodock@gmail.com>2018-08-11 05:15:59 +0300
commitf21e655b61725b972ae80d584a66d6deb53a337d (patch)
treef9fb191d364e30119eb7c02f65e4eef12936a232 /db/migrate/20180504195842_project_name_lower_index.rb
parentf6d47d0dee0cbbb49f778de9d196c3dae0dbce7f (diff)
disable_statement_timeout doesn't require any argument anymore
it will decide the method for disable statement_timeout upon per transaction or per session, based on how it's called. When calling with a block, block will be executed and it will use session based statement_timeout, otherwise will default to existing behavior.
Diffstat (limited to 'db/migrate/20180504195842_project_name_lower_index.rb')
-rw-r--r--db/migrate/20180504195842_project_name_lower_index.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/db/migrate/20180504195842_project_name_lower_index.rb b/db/migrate/20180504195842_project_name_lower_index.rb
index 856ccf0620e..74f3673bb03 100644
--- a/db/migrate/20180504195842_project_name_lower_index.rb
+++ b/db/migrate/20180504195842_project_name_lower_index.rb
@@ -13,7 +13,7 @@ class ProjectNameLowerIndex < ActiveRecord::Migration
def up
return unless Gitlab::Database.postgresql?
- disable_statement_timeout(transaction: false) do
+ disable_statement_timeout do
execute "CREATE INDEX CONCURRENTLY #{INDEX_NAME} ON projects (LOWER(name))"
end
end
@@ -21,7 +21,7 @@ class ProjectNameLowerIndex < ActiveRecord::Migration
def down
return unless Gitlab::Database.postgresql?
- disable_statement_timeout(transaction: false) do
+ disable_statement_timeout do
if supports_drop_index_concurrently?
execute "DROP INDEX CONCURRENTLY IF EXISTS #{INDEX_NAME}"
else