summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlejandro Rodríguez <alejorro70@gmail.com>2016-06-16 10:45:03 -0400
committerAlejandro Rodríguez <alejorro70@gmail.com>2016-06-20 11:25:10 -0400
commitbcecc1957120ed1e24b617d554637cd7da60d0cc (patch)
tree02ab43e6074ec93dbbe399e5ea2058044c99b764
parent699badabc9670e836eafaf1c66248f49ea41a098 (diff)
downloadgitlab-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
-rw-r--r--db/migrate/20160615191922_set_missing_stage_on_ci_builds.rb9
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