Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<Model>.probe crashes on indexed lower text #16

Open
samvandamme opened this issue Jan 1, 2024 · 0 comments
Open

<Model>.probe crashes on indexed lower text #16

samvandamme opened this issue Jan 1, 2024 · 0 comments

Comments

@samvandamme
Copy link

Thank you for this gem, it makes my life easier 🤗

When running User.probe the code crashes on a "lower case text index" index the DDL managed to output:
CREATE INDEX index_users_on_lower_address_city ON public.users USING btree (lower((address_city)::text));

My schema defines this index as:
t.index "lower((address_city)::text)", name: "index_users_on_lower_address_city"

The error:
index_users_on_lower_address_city [/Users/<user>/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/model_probe-1.1.3/lib/model_probe/probes/indexes.rb:19:in 'probe_index': undefined method 'each_with_index' for an instance of String (NoMethodError)

Rails 7.1.2
Ruby 3.3.0
PostgreSQL 13

@samvandamme samvandamme changed the title <Model>.probe crashes with indexed lower text <Model>.probe crashes on indexed lower text Jan 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant