summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-01-25 13:28:18 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-01-25 13:28:18 +0100
commit50e9824115bbefeb59319b4f20622b162c22063f (patch)
tree8365cca052e1f7f736a989650993b47ec95625fa
parentb97b4d258552cadc55f408a28569c4a0d34b38a3 (diff)
downloadgitlab-ce-50e9824115bbefeb59319b4f20622b162c22063f.tar.gz
Fix migration removing duplicate stages on MySQL again
-rw-r--r--db/post_migrate/20180119121225_remove_redundant_pipeline_stages.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/db/post_migrate/20180119121225_remove_redundant_pipeline_stages.rb b/db/post_migrate/20180119121225_remove_redundant_pipeline_stages.rb
index 597f6c3ee48..ce38026e7e2 100644
--- a/db/post_migrate/20180119121225_remove_redundant_pipeline_stages.rb
+++ b/db/post_migrate/20180119121225_remove_redundant_pipeline_stages.rb
@@ -23,6 +23,7 @@ class RemoveRedundantPipelineStages < ActiveRecord::Migration
execute <<~SQL
DELETE a FROM ci_stages AS a, ci_stages AS b
WHERE a.pipeline_id = b.pipeline_id AND a.name = b.name
+ AND a.id <> b.id
SQL
end
end