diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-07-05 09:11:15 +0200 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-07-05 09:11:15 +0200 |
commit | c5f1e1a70bd79b36fe8cfda75b7366dd8ee90d66 (patch) | |
tree | 06c75c37851b87603894daa3f73e35bee1a9ada9 /db | |
parent | 93d217bda639b94c129afd71343e429f935a4ada (diff) | |
download | gitlab-ce-c5f1e1a70bd79b36fe8cfda75b7366dd8ee90d66.tar.gz |
Disable statement timeout in stages statuses migration
Diffstat (limited to 'db')
-rw-r--r-- | db/post_migrate/20170630111158_migrate_stages_statuses.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/db/post_migrate/20170630111158_migrate_stages_statuses.rb b/db/post_migrate/20170630111158_migrate_stages_statuses.rb index 9dac91960ff..c0a5294720d 100644 --- a/db/post_migrate/20170630111158_migrate_stages_statuses.rb +++ b/db/post_migrate/20170630111158_migrate_stages_statuses.rb @@ -8,10 +8,6 @@ class MigrateStagesStatuses < ActiveRecord::Migration STATUSES = { created: 0, pending: 1, running: 2, success: 3, failed: 4, canceled: 5, skipped: 6, manual: 7 } - class Stage < ActiveRecord::Base - self.table_name = 'ci_stages' - end - class Build < ActiveRecord::Base self.table_name = 'ci_builds' @@ -67,6 +63,8 @@ class MigrateStagesStatuses < ActiveRecord::Migration end def up + disable_statement_timeout + status_sql = Build .where('ci_builds.commit_id = ci_stages.pipeline_id') .where('ci_builds.stage = ci_stages.name') @@ -78,6 +76,8 @@ class MigrateStagesStatuses < ActiveRecord::Migration end def down + disable_statement_timeout + execute <<-SQL.strip_heredoc UPDATE ci_stages SET status = null SQL |