Test if argument passed to a migration is present

This commit is contained in:
Grzegorz Bizon 2017-06-29 15:20:26 +02:00
parent 55f93db876
commit 989785a31d

View file

@ -2,7 +2,7 @@ module Gitlab
module BackgroundMigration
class MigrateBuildStageIdReference
def perform(id)
raise ArgumentError unless id.is_a?(Integer)
raise ArgumentError unless id.present?
sql = <<-SQL.strip_heredoc
UPDATE "ci_builds" SET "stage_id" = (