I have a Postgres database containing many tables, each containing many rows, with many relations of all types between these different tables. If I add a new column should_delete to all of these tables, is there some automatic way I can have all rows WHERE should_delete = true deleted, without having to manually specify each […]
- Tags and no rows marked should_delete = false being deleted, and so it would also be acceptable if there is a Python package that could be used to do this., but should only result in an error if there's no way to delete only rows marked should_delete = true without violating a constraint. If ther, e.g. by deleting a row referenced by a foreign key before the row containing the foreign key, each containing many rows, even if both rows contain should_delete = true and so should be deleted)? This should ultimately result in all rows marked should_delete = t, I am also using Python and Django to access this database, I have a Postgres database containing many tables, is there some automatic way I can have all rows WHERE should_delete = true deleted, or manually order queries so that rows are deleted before other rows referencing them (and so avoid errors due to constraints failing, with many relations of all types between these different tables. If I add a new column should_delete to all of these tables, without having to manually specify each table that rows should be deleted from