mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-09 12:46:07 +10: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.
12 lines
242 B
Ruby
12 lines
242 B
Ruby
# rubocop:disable all
|
|
class FixNamespaces < ActiveRecord::Migration
|
|
def up
|
|
Namespace.where('name <> path and type is null').each do |namespace|
|
|
namespace.update_attribute(:name, namespace.path)
|
|
end
|
|
end
|
|
|
|
def down
|
|
end
|
|
end
|