gitlab-org--gitlab-foss/db/migrate/20151023112551_fail_build_with_empty_name.rb
2015-10-23 13:33:44 +02:00

5 lines
183 B
Ruby

class FailBuildWithEmptyName < ActiveRecord::Migration
def change
execute("UPDATE ci_builds SET status='failed' WHERE (name IS NULL OR name='') AND status='pending'")
end
end