gregnavis / active_record_doctor

Identify database issues before they hit production.
MIT License
1.72k stars 56 forks source link

False positives when case-insensitive unique indexes have CITEXT strings #167

Open gee-forr opened 8 months ago

gee-forr commented 8 months ago

Hi there,

Thanks for this great gem. It's such a useful tool and we love it.

I noticed that when I run it against a postgres db that has a unique index on a Postgres Case Insensitive Text (CITEXT) string, it still recommends creating an index using the lower(column_name) function.

My understanding is that using a CITEXT field removes the need for using lower() in the index.

@gregnavis Would you be keen on me submitting a PR to avoid this false positive?

fatkodima commented 8 months ago

Your understanding is correct. Please open a PR.

jdufresne commented 2 weeks ago

I believe this issue was resolved in bb22c7b85bc624fec01529e74f8dab818ba0ce34 so perhaps this is ready to be closed.