alembic-postgresql-enum icon indicating copy to clipboard operation
alembic-postgresql-enum copied to clipboard

Issue when updating an Enum which is already in used by another table

Open cthorey opened this issue 11 months ago • 1 comments

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?

cthorey avatar Mar 11 '24 15:03 cthorey

Please provide generated migration for more context

RustyGuard avatar Mar 11 '24 15:03 RustyGuard

Closed due to lack of details

AlexandrovRoman avatar Jul 22 '24 17:07 AlexandrovRoman