consistency_fail icon indicating copy to clipboard operation
consistency_fail copied to clipboard

A tool for detecting missing unique indexes in Rails projects

Results 9 consistency_fail issues
Sort by recently updated
recently updated
newest added

If you are using `structure.sql` in your Rails + Postgres project, you have the ability to use expression indexes. For example: ``` sql CREATE UNIQUE INDEX index_users_on_lower_name ON users(LOWER(name)); ```...

Looks like `require_dependency` is biting us against. This time it fails with Rails 6. ```console $ consistency_fail Traceback (most recent call last): 8: from /Users/user/.rbenv/versions/2.6.1/bin/consistency_fail:23:in `' 7: from /Users/user/.rbenv/versions/2.6.1/bin/consistency_fail:23:in `load'...

Hi! This isn't really a problem caused by this gem, but thought I'd post here as it's the first place people might look! After upgrading Rails to `5.2`, I see...

Addresses issues with comparing strings to symbols.

Installed and ran against a Rails 5.1.4 app using Ruby 2.5.0p0. I get the following exception: ``` Traceback (most recent call last): 12: from /Users/omitted/.rbenv/versions/2.5.0/gemsets/omitted/bin/consistency_fail:23:in `' 11: from /Users/omitted/.rbenv/versions/2.5.0/gemsets/omitted/bin/consistency_fail:23:in `load'...

A `has_one` may be a refinement of a `has_many`. In this case, there cannot and should not be a unique constraint on the foreign key. Currently the gem does not...

We're leveraging this gem to notify developers of missing indexes during our CI runs. The way we've implemented it, is to overwrite the `mega_fail!` method in `ConsistencyFail::Enforcer`. This isn't ideal...

Would be super convenient if it automatically created a migration or the migration content to add the missing indexes

This is the opposite behaviour of the gem, but it seems it would be useful to identify instances in which the unique constraint is defined at the database (schema) level,...