diff options
author | Sean McGivern <sean@gitlab.com> | 2016-06-09 15:39:16 +0300 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2016-06-09 18:05:25 +0300 |
commit | 98bb435f4266719b1e0fca57472a0f4e50d30371 (patch) | |
tree | 530dcd4c4ee397ae77e94a493fcefae6b4df72a7 /db/migrate/20150425164647_remove_duplicate_tags.rb | |
parent | 3803b380b43af2bdb20dced27fce79511dfb2897 (diff) |
Enable RuboCop for migrations
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.
Diffstat (limited to 'db/migrate/20150425164647_remove_duplicate_tags.rb')
-rw-r--r-- | db/migrate/20150425164647_remove_duplicate_tags.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/db/migrate/20150425164647_remove_duplicate_tags.rb b/db/migrate/20150425164647_remove_duplicate_tags.rb index 13e5038db9c..e77623bf507 100644 --- a/db/migrate/20150425164647_remove_duplicate_tags.rb +++ b/db/migrate/20150425164647_remove_duplicate_tags.rb @@ -1,3 +1,4 @@ +# rubocop:disable all class RemoveDuplicateTags < ActiveRecord::Migration def up select_all("SELECT name, COUNT(id) as cnt FROM tags GROUP BY name HAVING COUNT(id) > 1").each do |tag| |