diff options
author | Alejandro RodrÃguez <alejorro70@gmail.com> | 2016-06-16 10:45:03 -0400 |
---|---|---|
committer | Alejandro RodrÃguez <alejorro70@gmail.com> | 2016-06-20 11:25:10 -0400 |
commit | bcecc1957120ed1e24b617d554637cd7da60d0cc (patch) | |
tree | 02ab43e6074ec93dbbe399e5ea2058044c99b764 /db/migrate/20160615191922_set_missing_stage_on_ci_builds.rb | |
parent | 699badabc9670e836eafaf1c66248f49ea41a098 (diff) | |
download | gitlab-ce-17949-error-500-on-gitlab-org-when-visiting-pipelines.tar.gz |
Set missing stages on ci builds to 'test' to avoid regressions in the pipelines view17949-error-500-on-gitlab-org-when-visiting-pipelines
Diffstat (limited to 'db/migrate/20160615191922_set_missing_stage_on_ci_builds.rb')
-rw-r--r-- | db/migrate/20160615191922_set_missing_stage_on_ci_builds.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/db/migrate/20160615191922_set_missing_stage_on_ci_builds.rb b/db/migrate/20160615191922_set_missing_stage_on_ci_builds.rb new file mode 100644 index 00000000000..bd0463886bc --- /dev/null +++ b/db/migrate/20160615191922_set_missing_stage_on_ci_builds.rb @@ -0,0 +1,9 @@ +class SetMissingStageOnCiBuilds < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + def up + update_column_in_batches(:ci_builds, :stage, :test) do |table, query| + query.where(table[:stage].eq(nil)) + end + end +end |