alembic-postgresql-enum
alembic-postgresql-enum copied to clipboard
Issue when updating an Enum which is already in used by another table
Hey - kudos on developing this !! I ran against some trouble when trying to apply a migration when I altered an enum which was already in use in some existing table.
sqlalchemy.exc.InternalError: (psycopg2.errors.DependentObjectsStillExist) cannot drop type statusenum_old because other objects depend on it
DETAIL: column status of table tenant_default.gaussian_splatting_modelzoo depends on type statusenum_old
column status of table tenant_default.pipeline_tasks depends on type statusenum_old
column status of table tenant_default.ci_jobs depends on type statusenum_old
HINT: Use DROP ... CASCADE to drop the dependent objects too.
Is there a way to pass this CASCADE argument to the query?
Please provide generated migration for more context
Closed due to lack of details