mirror of
https://github.com/plankanban/planka.git
synced 2026-02-25 11:21:03 +03:00
[Feature Request] Proper SQL cleanup #396
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @daberlin on GitHub (Dec 17, 2023).
Seems like deleting objects leaves a lot of orphans in the DB.
Cleanup proposal:
@meltyshev commented on GitHub (Dec 20, 2023):
Hi! Thanks for sharing the cleanup proposal. We are planning to redesign the entire deletion process so that no related data is left behind when deleting.
@hwelch-fle commented on GitHub (Jan 17, 2024):
Would this not be pretty easily accomplished by making sure the database is configured to cascade deletions from parent tables?
Would be pretty easy to roll out in a knex migration that adds the CASCADE keyword to related fields of child rows.
@meltyshev commented on GitHub (Jan 17, 2024):
Yes, that's one way to solve it, but then there would be a problem that we need to delete all uploaded attachments, meaning we would still have to do a separate query to get their id's before deleting them from the database. It also seems that there are no relations between tables in the database, as no foreign keys were used. Probably the easiest way would be to just add deleting related data to delete* helpers. We don't like that the data is not completely deleted now either and we'll definitely solve this problem.
@meltyshev commented on GitHub (May 13, 2025):
This should be resolved in v2, but feel free to reopen if the issue persists.