summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-03-16 09:57:53 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-03-16 09:57:53 +0100
commit0e9a5e73ca40a32507c8771dc8e650a0fb853c4b (patch)
treefdbb3be414dc2cf3ff315ef94ddfeaffea3a28e7 /db
parent50692556815dc7bc4ee8aa3175cf22226739a470 (diff)
downloadgitlab-ce-0e9a5e73ca40a32507c8771dc8e650a0fb853c4b.tar.gz
Fix statements timeout in manual actions migrationfix/gb/fix-timeouts-in-manual-actions-migration
Diffstat (limited to 'db')
-rw-r--r--db/post_migrate/20170306170512_migrate_legacy_manual_actions.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/db/post_migrate/20170306170512_migrate_legacy_manual_actions.rb b/db/post_migrate/20170306170512_migrate_legacy_manual_actions.rb
index 9020e0d054c..ec6e8cdfc45 100644
--- a/db/post_migrate/20170306170512_migrate_legacy_manual_actions.rb
+++ b/db/post_migrate/20170306170512_migrate_legacy_manual_actions.rb
@@ -4,6 +4,8 @@ class MigrateLegacyManualActions < ActiveRecord::Migration
DOWNTIME = false
def up
+ disable_statement_timeout
+
execute <<-EOS
UPDATE ci_builds SET status = 'manual', allow_failure = true
WHERE ci_builds.when = 'manual' AND ci_builds.status = 'skipped';
@@ -11,6 +13,8 @@ class MigrateLegacyManualActions < ActiveRecord::Migration
end
def down
+ disable_statement_timeout
+
execute <<-EOS
UPDATE ci_builds SET status = 'skipped', allow_failure = false
WHERE ci_builds.when = 'manual' AND ci_builds.status = 'manual';