top of page

Could Deleting One Project Also Delete Records You Intended to Keep?

Oct 26
3 min read

A delete button may name one project while the database removes several related records. The visible action and the underlying effect can differ when foreign keys use cascading deletion. That is a design decision worth reviewing before real work accumulates.


The goal is not to ban cascades. It is to make the deletion boundary match the meaning of the records, then give the application an accurate account of what will happen.


Inspect the actual relationships


PostgreSQL documents ON DELETE CASCADE as automatically deleting referencing rows when the referenced row is deleted. Other configured actions can block deletion or change the referencing value.


Draw a small relationship map from the current schema. Include indirect dependents, not just the tables the application writes directly. Record each configured delete action beside its relationship.


Ask a domain owner whether each child is merely part of its parent or represents an independently meaningful object. Similar column names do not settle that question.


Rehearse one realistic deletion


Illustrative example: project and assignments


A fictional project contains three temporary planning notes and links to two contributor profiles. The notes may have no purpose outside the project. The contributor profiles may participate in many other projects.


A proposed acceptance rule is that deleting the project removes its temporary notes and assignment links while preserving the contributor profiles. This is a product decision for the example, not a universal retention policy.


Create a disposable fixture with another project linked to one of those profiles. That second relationship helps reveal a deletion rule that reaches too far.


Inspect more than the success response


After the test, count and identify the remaining records in each affected table. Verify that the other project's assignment still resolves to its contributor.


Also check what happens if the delete is rejected. The application should not announce completion while dependent records remain unchanged because the database blocked the operation.


Separate deletion from archiving


Archiving a project can mean removing it from active work while retaining its history. It is not automatically equivalent to deleting the parent row.


Specify which operation the interface offers. A label such as “archive” should not secretly trigger irreversible removal of dependent content. Conversely, a deletion workflow should not claim removal when it only hides a record.


Where retention obligations or sensitive records are involved, obtain the applicable organizational decision before implementing the schema behavior. This guide does not determine a legal retention period.


Include downstream effects


A database relationship does not describe every external copy. Search indexes, exports and connected tools may follow separate update processes.


List those consumers in the deletion review and distinguish the database result from downstream completion. A successful local cascade does not establish that every connected system has removed its copy.


Record the evidence needed for each destination without assuming they all use the same identifier or timing.


Make impact reviewable


Before release, keep a fixture with one parent, several dependent details, one shared independent object and one unrelated parent. State the expected survivors explicitly.


Review permissions and confirmation wording against that impact. The interface should communicate the business objects affected, not expose a list of database tables to ordinary users.


For connected systems, see how deletions travel through integrations. A useful handoff includes the relationship map, the expected survivors and the observed result of the rehearsal.


Editorial note


Prepared with AI assistance. Primary sources and the FutureOS article inventory were checked on October 26, 2026. Examples are illustrative, not customer results. FutureOS is described as being in prelaunch in its current introduction. This guide does not claim an available product feature, integration or service, and no independent expert review is claimed.


Comments


Commenting on this post isn't available anymore. Contact the site owner for more info.
bottom of page