I'm working on legacy database with poor structure and want to introduce some quality of life improvements like replacing UNIQUE constraints with PRIMARY KEYs. However pgschema fails to achieve this with an error
Error: failed to execute concatenated statements in group 1: ERROR: cannot drop constraint cases_id_key on table cases because other objects depend on it (SQLSTATE 2BP01)
as it does not drop constraint in CASCADE mode. I've searched docs and code but did not find any clue if I can achieve this with pgschema. So, is there a way to drop constraint in cascade mode without executing extra sql scripts?
I'm working on legacy database with poor structure and want to introduce some quality of life improvements like replacing UNIQUE constraints with PRIMARY KEYs. However pgschema fails to achieve this with an error
as it does not drop constraint in CASCADE mode. I've searched docs and code but did not find any clue if I can achieve this with pgschema. So, is there a way to drop constraint in cascade mode without executing extra sql scripts?