Closed iatanas0v closed 1 year ago
Hi @iatanas0v,
Thank you a lot for using the gem and reporting the issue!
I will fix it as soon as possible.
Hey,
I just released 1.7.10. Please try it out, and let me know if the issue was fixed.
Please feel free to reopen the issue if you need to.
Have a great day!
@djezzzl works great :rocket: thanks for the quick fix
I'm happy to hear that!
Have a great rest of the week!
Defining index columns as a string instead of an array leads to false-positive output. You can see the schema details below. The column that's reported as missing index is part of a compound index and is the first column in that index, so it'd be used when querying.
The problem is that the
database_consistency
check does not work with index columns defined as string.After some debugging, I pinpointed the problem to this line: https://github.com/djezzzl/database_consistency/blob/3bbdb228ec80b1b02d5ab5bea9415eaa367a5069/lib/database_consistency/checkers/association_checkers/missing_index_checker.rb#L89
Schema
Models
Migration for the index
Output
Expected Output No errors to be reported