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

EnumTypeChecker is complaining about enum column #160

Closed
toydestroyer opened this issue Nov 29, 2022 · 4 comments
Closed

EnumTypeChecker is complaining about enum column #160

toydestroyer opened this issue Nov 29, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@toydestroyer
Copy link
Contributor

Hey there! Me again.

I've identified an issue with the new EnumTypeChecker. We store our enums in enum type columns in postgres. We are using this gem to do so, but it is also available in Rails 7 natively.

Anyway, EnumTypeChecker doesn't like it. But it should be okay and even preferable!

I would actually love to have a checker that complains when you try to store ActiveRecord enums in non-enum columns.

@djezzzl djezzzl added the bug Something isn't working label Nov 29, 2022
@djezzzl
Copy link
Owner

djezzzl commented Nov 29, 2022

Hi @toydestroyer ,

Thank you for sharing this! Indeed I agree this should be improved!

I will fix it ASAP.

@djezzzl
Copy link
Owner

djezzzl commented Nov 29, 2022

The issue was released in 1.5.1. Please try it out and let me know if it still stays.

@djezzzl djezzzl closed this as completed Nov 29, 2022
@toydestroyer
Copy link
Contributor Author

Verified 👍

Thanks for your amazing work @djezzzl! I hope I'll be able to finally contribute at some point 😂

I would actually love to have a checker that complains when you try to store ActiveRecord enums in non-enum columns.

What do you think about this? Shall I open another issue for discussion?

@djezzzl
Copy link
Owner

djezzzl commented Dec 1, 2022

Hey @toydestroyer,

I hope I'll be able to finally contribute at some point 😂

You have already contributed a lot! Please keep it going!

What do you think about this? Shall I open another issue for discussion?

I like the idea but we should have sound reasoning for suggesting this. This is an excellent opportunity for comprehensive research. For example, do we save any space on a disk with enums? Or is the querying/filtering/sorting/indexing any faster?

In case we see it has more benefits than disadvantages, I'm all up to have this checker. Would you like to research it and share it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants