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

Cannot cast enum to another #85

Open
sherpya opened this issue Oct 31, 2024 · 0 comments
Open

Cannot cast enum to another #85

sherpya opened this issue Oct 31, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@sherpya
Copy link

sherpya commented Oct 31, 2024

I've changed an enum and I'm getting:

sqlalchemy.exc.ProgrammingError: (sqlalchemy.dialects.postgresql.asyncpg.ProgrammingError) <class 'asyncpg.exceptions.CannotCoerceError'>: cannot cast type first_enum to second_enum

the fix is simple, instead of using postgresql_using='first_enum::second', I've changed to postgresql_using='first_enum::VARCHAR::second_enum'

@AlexandrovRoman AlexandrovRoman added the bug Something isn't working label Nov 19, 2024
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