Read about our upcoming Code of Conduct on this issue

  1. 12 Jan, 2018 1 commit
  2. 11 Jan, 2018 1 commit
  3. 26 Dec, 2017 1 commit
  4. 22 Dec, 2017 1 commit
  5. 13 Dec, 2017 1 commit
  6. 11 Dec, 2017 1 commit
    • Sean McGivern's avatar
      Add cop for use of remove_column · 1f17bdef3a64
      Sean McGivern authored
      remove_column should only be used in the up (or change) step of a migration if
      it's a post-deployment migration. Otherwise there will be downtime due to the
      ActiveRecord column cache, which we can avoid by using the IgnorableColumn
      concern in combination with a post-deployment migration.
      1f17bdef3a64
  7. 22 Nov, 2017 1 commit
  8. 17 Nov, 2017 2 commits
    • Lin Jen-Shin's avatar
      Remove codes from bad merge · b1ffb7a56c60
      Lin Jen-Shin authored
      b1ffb7a56c60
    • Sean McGivern's avatar
      Prevent update_column_in_batches on large tables · c4bf67b6300e
      Sean McGivern authored
      add_column_with_default is implemented in terms of update_column_in_batches, but
      update_column_in_batches can be used independently. Neither of these should be
      used on the specified large tables, because they will cause issues on large
      instances like GitLab.com.
      
      This also ignores the cop for all existing migrations, renaming
      AddColumnWithDefaultToLargeTable where appropriate.
      c4bf67b6300e
  9. 16 Nov, 2017 1 commit
  10. 21 Oct, 2017 1 commit
  11. 18 Oct, 2017 1 commit
  12. 07 Oct, 2017 1 commit
    • Jacopo's avatar
      Replaces `tag: true` into `:tag` in the specs · f4ef7328afe4
      Jacopo authored
      Replaces all the explicit include metadata syntax in the specs (tag:
      true) into the implicit one (:tag).
      Added a cop to prevent future errors and handle autocorrection.
      f4ef7328afe4
  13. 18 Sep, 2017 1 commit
  14. 14 Aug, 2017 1 commit
  15. 14 Jul, 2017 1 commit
  16. 07 Jul, 2017 2 commits
    • Yorick Peterse's avatar
      Added EachBatch for iterating tables in batches · 843dd6ceff61
      Yorick Peterse authored
      This module provides a class method called `each_batch` that can be used
      to iterate tables in batches in a more efficient way compared to Rails'
      `in_batches` method. This commit also includes a RuboCop cop to
      blacklist the use of `in_batches` in favour of this new method.
      843dd6ceff61
    • Yorick Peterse's avatar
      Added EachBatch for iterating tables in batches · 6ab91e2c0aae
      Yorick Peterse authored
      This module provides a class method called `each_batch` that can be used
      to iterate tables in batches in a more efficient way compared to Rails'
      `in_batches` method. This commit also includes a RuboCop cop to
      blacklist the use of `in_batches` in favour of this new method.
      6ab91e2c0aae
  17. 06 Jul, 2017 3 commits
    • Douwe Maan's avatar
      Add ProjectPathHelper cop · 181380437044
      Douwe Maan authored
      181380437044
    • Yorick Peterse's avatar
      Rename ActiverecordSerialize cop · 7ad2610c921d
      Yorick Peterse authored
      This cop has been renamed to ActiveRecordSerialize to match the way
      "ActiveRecord" is usually written.
      7ad2610c921d
    • Yorick Peterse's avatar
      Added Cop to blacklist the use of `dependent:` · ccb23d8870a8
      Yorick Peterse authored
      This is allowed for existing instances so we don't end up 76 offenses
      right away, but for new code one should _only_ use this if they _have_
      to remove non database data. Even then it's usually better to do this in
      a service class as this gives you more control over how to remove the
      data (e.g. in bulk).
      ccb23d8870a8
  18. 05 Jul, 2017 1 commit
  19. 14 Jun, 2017 1 commit
  20. 13 Jun, 2017 1 commit
  21. 07 Jun, 2017 1 commit
  22. 06 Jun, 2017 1 commit
  23. 31 May, 2017 1 commit
  24. 29 May, 2017 1 commit
  25. 28 Apr, 2017 2 commits
  26. 05 Apr, 2017 1 commit
  27. 07 Mar, 2017 1 commit
  28. 01 Mar, 2017 1 commit
  29. 10 Feb, 2017 1 commit
    • Yorick Peterse's avatar
      Enforce use of add_concurrent_foreign_key · fa4928eb97ca
      Yorick Peterse authored
      This adds a Rubocop rule to enforce the use of
      add_concurrent_foreign_key instead of the regular add_foreign_key
      method. This cop has been disabled for existing migrations so we don't
      need to change those.
      fa4928eb97ca
  30. 09 Feb, 2017 1 commit
  31. 08 Feb, 2017 2 commits
  32. 31 Jan, 2017 1 commit
  33. 29 Jun, 2016 1 commit
    • Yorick Peterse's avatar
      Added RuboCop cops for checking DB migrations · 9ceee4d7e97b
      Yorick Peterse authored
      There are currently two cops for this:
      
      * Migration/AddIndex: checks if indexes are added concurrently
      * Migration/ColumnWithDefault: checks if columns with default values are
        added in a concurrent manner
      
      Both cops are fairly simple and make no attempt at correcting the code
      as this is quite hard to do (e.g. modifications may need to be applied
      in various places in the same file). They however should provide enough
      to catch people ignoring the comments in generated migrations telling
      them to use add_concurrent_index or add_column_with_default.
      9ceee4d7e97b