Cannot cast enum to another
Opened this issue · 0 comments
sherpya commented
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'