mirror of
https://github.com/reconurge/flowsint.git
synced 2026-05-07 04:09:49 -05:00
[PR #125] [MERGED] feat(core): Soft delete #1117
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?
📋 Pull Request Information
Original PR: https://github.com/reconurge/flowsint/pull/125
Author: @gustavorps
Created: 2/20/2026
Status: ✅ Merged
Merged: 3/2/2026
Merged by: @dextmorgn
Base:
main← Head:feat/soft-delete📝 Commits (1)
a574d4efeat(core): soft delete📊 Changes
2 files changed (+164 additions, -79 deletions)
View changed files
📝
flowsint-core/src/flowsint_core/core/graph/repository.py(+91 -38)📝
flowsint-core/tests/core/graph/in_memory_graph_repository.py(+73 -41)📄 Description
This pull request implements soft deletion for nodes and relationships in the graph repository, replacing hard deletes with a
deleted_attimestamp. All queries and operations are updated to respect this new soft delete mechanism, ensuring that "deleted" entities are excluded from results and not modified further. The in-memory test repository is also updated to reflect these changes for consistency in testing.Soft Delete Implementation:
All delete operations for nodes and relationships now set a
deleted_attimestamp instead of removing records from the database. Associated relationships are also soft-deleted when a node is deleted.The in-memory test repository mirrors this behavior, updating its logic to mark entities as deleted and exclude them from future operations and queries.
Query and Update Adjustments:
deleted_at IS NULLto ensure only active (non-deleted) nodes and relationships are returned or modified. This includes node/relationship creation, updating, merging, and graph traversal methods.Node and Relationship Creation Updates:
deleted_atproperty is explicitly set tonullto indicate they are active. [1] [2] [3] [4] [5] [6]Test Repository Enhancements:
Documentation Updates:
These changes collectively ensure that deletions in the graph are non-destructive and reversible, improving data integrity and auditability.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.