To ensure data integrity and performance, we need to: * Ensure all relevant indexes are also unique * Set up partial indexes so `deleted_at` records are not considered for uniqueness * Set up partial indexes so records are scoped to their `Tenant`/`Organization` or `ContentType` (unsure how possible all of this is) See: * http://blog.bigbinary.com/2016/07/20/rails-5-adds-support-for-expression-indexes-for-postgresql.html * https://jacopretorius.net/2017/04/validate-uniqueness-in-rails.html
Activity
[-]Indexes Lack Scoped Uniqueness Constraints[/-][+]Indices Lack Scoped Uniqueness Constraints[/+]