1. 06 7月, 2017 3 次提交
    • Y
      Added Cop to blacklist the use of `dependent:` · 8fbbf41e
      Yorick Peterse 提交于
      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).
      8fbbf41e
    • Y
      Add many foreign keys to the projects table · c63e3221
      Yorick Peterse 提交于
      This removes the need for relying on Rails' "dependent" option for data
      removal, which is _incredibly_ slow (even when using :delete_all) when
      deleting large amounts of data. This also ensures data consistency is
      enforced on DB level and not on application level (something Rails is
      really bad at).
      
      This commit also includes various migrations to add foreign keys to
      tables that eventually point to "projects" to ensure no rows get
      orphaned upon removing a project.
      c63e3221
    • D
  2. 05 7月, 2017 3 次提交
  3. 04 7月, 2017 3 次提交
  4. 30 6月, 2017 4 次提交
  5. 29 6月, 2017 4 次提交
  6. 28 6月, 2017 5 次提交
  7. 26 6月, 2017 1 次提交
  8. 24 6月, 2017 3 次提交
  9. 21 6月, 2017 1 次提交
  10. 20 6月, 2017 2 次提交
  11. 17 6月, 2017 1 次提交
  12. 16 6月, 2017 1 次提交
    • Y
      Refactor Project.with_feature_available_for_user · 73bf9413
      Yorick Peterse 提交于
      This method used to use a UNION, which would lead to it performing the
      same query twice; producing less than ideal performance. Further, in
      certain cases ActiveRecord could get confused and mess up the variable
      bindings, though it's not clear how/why exactly this happens.
      
      Fortunately we can work around all of this by building some of the WHERE
      conditions manually, allowing us to use a simple OR statement to get all
      the data we want without any of the above problems.
      73bf9413
  13. 08 6月, 2017 2 次提交
  14. 06 6月, 2017 1 次提交
  15. 03 6月, 2017 2 次提交
  16. 31 5月, 2017 4 次提交