1. 17 Nov, 2017 1 commit
    • Sean McGivern's avatar
      Prevent update_column_in_batches on large tables · d8be9814
      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.
      d8be9814
  2. 21 Oct, 2017 1 commit
  3. 18 Oct, 2017 1 commit
  4. 10 Oct, 2017 1 commit
  5. 07 Oct, 2017 1 commit
    • jacopo's avatar
      Replaces `tag: true` into `:tag` in the specs · 0ce67858
      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.
      0ce67858
  6. 14 Aug, 2017 1 commit
  7. 01 Aug, 2017 1 commit
  8. 26 Jul, 2017 1 commit
  9. 14 Jul, 2017 1 commit
  10. 07 Jul, 2017 2 commits
    • Yorick Peterse's avatar
      Added EachBatch for iterating tables in batches · ff78af15
      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.
      ff78af15
    • Yorick Peterse's avatar
      Added EachBatch for iterating tables in batches · 5f9c8458
      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.
      5f9c8458
  11. 06 Jul, 2017 3 commits
  12. 05 Jul, 2017 1 commit
  13. 14 Jun, 2017 2 commits
  14. 13 Jun, 2017 1 commit
  15. 07 Jun, 2017 1 commit
  16. 06 Jun, 2017 1 commit
  17. 31 May, 2017 1 commit
  18. 29 May, 2017 1 commit
  19. 28 Apr, 2017 3 commits
  20. 05 Apr, 2017 1 commit
  21. 07 Mar, 2017 1 commit
  22. 01 Mar, 2017 2 commits
  23. 23 Feb, 2017 5 commits
  24. 10 Feb, 2017 1 commit
    • Yorick Peterse's avatar
      Enforce use of add_concurrent_foreign_key · 766060bc
      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.
      766060bc
  25. 09 Feb, 2017 1 commit
  26. 08 Feb, 2017 2 commits
  27. 31 Jan, 2017 1 commit
  28. 29 Jun, 2016 1 commit
    • Yorick Peterse's avatar
      Added RuboCop cops for checking DB migrations · c740445a
      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.
      c740445a