diff options
author | Gabriel Mazetto <brodock@gmail.com> | 2018-07-09 23:31:45 +0200 |
---|---|---|
committer | Gabriel Mazetto <brodock@gmail.com> | 2018-08-10 20:40:00 +0200 |
commit | 119c49172f6ff37605d72faf2e4868ecdb696a61 (patch) | |
tree | f80513221cc660d6dd67d6edaffdbdcf469fe4ee /db/optional_migrations | |
parent | 09e7c75d1bf871d0c011ea0f9abfb56fab03b919 (diff) | |
download | gitlab-ce-119c49172f6ff37605d72faf2e4868ecdb696a61.tar.gz |
Fix specs to use `disable_statement_timeout` correctly
Diffstat (limited to 'db/optional_migrations')
-rw-r--r-- | db/optional_migrations/composite_primary_keys.rb | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/db/optional_migrations/composite_primary_keys.rb b/db/optional_migrations/composite_primary_keys.rb index d45705021b0..7fbc3d4461d 100644 --- a/db/optional_migrations/composite_primary_keys.rb +++ b/db/optional_migrations/composite_primary_keys.rb @@ -29,18 +29,20 @@ class CompositePrimaryKeysMigration < ActiveRecord::Migration def up return unless Gitlab::Database.postgresql? - disable_statement_timeout - TABLES.each do |index| - add_primary_key(index) + disable_statement_timeout(transaction: false) do + TABLES.each do |index| + add_primary_key(index) + end end end def down return unless Gitlab::Database.postgresql? - disable_statement_timeout - TABLES.each do |index| - remove_primary_key(index) + disable_statement_timeout(transaction: false) do + TABLES.each do |index| + remove_primary_key(index) + end end end |