mirror of
https://github.com/gitlabhq/gitlabhq.git
synced 2025-08-20 16:30:26 +00:00

Migrations shouldn't fail RuboCop checks - especially lint checks, such as the nested method check. To avoid changing code in existing migrations, add the magic comment to the top of each of them to skip that file.
7 lines
229 B
Ruby
7 lines
229 B
Ruby
# rubocop:disable all
|
|
class RemoveInvalidMilestonesFromMergeRequests < ActiveRecord::Migration
|
|
def up
|
|
execute("UPDATE merge_requests SET milestone_id = NULL where milestone_id NOT IN (SELECT id FROM milestones)")
|
|
end
|
|
end
|