summaryrefslogtreecommitdiff
path: root/db/optional_migrations
diff options
context:
space:
mode:
authorGabriel Mazetto <brodock@gmail.com>2018-08-11 01:45:46 +0200
committerGabriel Mazetto <brodock@gmail.com>2018-08-11 04:15:59 +0200
commitf21e655b61725b972ae80d584a66d6deb53a337d (patch)
treef9fb191d364e30119eb7c02f65e4eef12936a232 /db/optional_migrations
parentf6d47d0dee0cbbb49f778de9d196c3dae0dbce7f (diff)
downloadgitlab-ce-f21e655b61725b972ae80d584a66d6deb53a337d.tar.gz
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/optional_migrations')
-rw-r--r--db/optional_migrations/composite_primary_keys.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/db/optional_migrations/composite_primary_keys.rb b/db/optional_migrations/composite_primary_keys.rb
index 7fbc3d4461d..b330da13d43 100644
--- a/db/optional_migrations/composite_primary_keys.rb
+++ b/db/optional_migrations/composite_primary_keys.rb
@@ -29,7 +29,7 @@ class CompositePrimaryKeysMigration < ActiveRecord::Migration
def up
return unless Gitlab::Database.postgresql?
- disable_statement_timeout(transaction: false) do
+ disable_statement_timeout do
TABLES.each do |index|
add_primary_key(index)
end
@@ -39,7 +39,7 @@ class CompositePrimaryKeysMigration < ActiveRecord::Migration
def down
return unless Gitlab::Database.postgresql?
- disable_statement_timeout(transaction: false) do
+ disable_statement_timeout do
TABLES.each do |index|
remove_primary_key(index)
end