Closed SeanLF closed 2 years ago
Hi! Thanks for the reporting!
The reason you are getting this error is because Rails 7 rc1 just added this: https://github.com/rails/rails/commit/4eef348584087c81f1e32ad971baf632b0149cd4#diff-0989923401a81fa4208ffc75f8e8622d20353373f9ba38c373d7ff15485b20b4
which is basically adding support for custom enums directly in the postgresql AR adapter. It adds the create_enum
method in migrations and requires an enum_type
option that points to the name of the enum; kinda like enum_name
in this gem's speak.
That's just a quick scan I had and didn't look properly how to resolve this. It seems now that create_enum
is provided by both rails and this gem, so not entirely sure what the right course of action is.
@muxcmux Thank you for the link! I see that support for enums is very poor. So I decided to override that feature. The PR is still WIP. I'm going to continue working on it next week.
Yeah, that addition to create_enum
in Rails seems quite basic. There's no support for removing an enum once added or updating an enum's values.
Thanks for jumping on top of this!
Just released https://github.com/bibendi/activerecord-postgres_enum/releases/tag/v2.0.0 Sorry for the breaking changes.
Describe the bug Tests fail on Rails 7 rc1
To Reproduce Steps to reproduce the behavior:
7.0.0.rc1
enum_name
in the schema (or run tests)Expected behavior No errors occur
Additional context https://github.com/SeanLF/activerecord-postgres_enum/runs/4438226882?check_suite_focus=true