Commit 989785a3 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Test if argument passed to a migration is present

parent 55f93db8
...@@ -2,7 +2,7 @@ module Gitlab ...@@ -2,7 +2,7 @@ module Gitlab
module BackgroundMigration module BackgroundMigration
class MigrateBuildStageIdReference class MigrateBuildStageIdReference
def perform(id) def perform(id)
raise ArgumentError unless id.is_a?(Integer) raise ArgumentError unless id.present?
sql = <<-SQL.strip_heredoc sql = <<-SQL.strip_heredoc
UPDATE "ci_builds" SET "stage_id" = ( UPDATE "ci_builds" SET "stage_id" = (
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment