Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix AGS Cascading Delete Issue #5804

Merged
merged 6 commits into from
Mar 3, 2025
Merged

Fix AGS Cascading Delete Issue #5804

merged 6 commits into from
Mar 3, 2025

Conversation

victordibia
Copy link
Collaborator

Why are these changes needed?

Hey Victor, this is maybe a bug, but when a session is delete, runs and messages for that session are not deleted, any reason why to keep them?

@husseinmozannar

The main fix is to add a pragma that ensures SQL lite enforces foreign key constraints.
Also needed to update error messages for autoupgrade of databases. Also adds a test for cascade deletes and for parts of teammanager

With this fix,

  • Messages get deleted when the run is deleted
  • Runs get deleted when sessiosn are deleted
  • Sessions get deleted when a team is deleted

Related issue number

Checks

Copy link

codecov bot commented Mar 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.17%. Comparing base (8c9961e) to head (49cdbaa).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5804   +/-   ##
=======================================
  Coverage   75.17%   75.17%           
=======================================
  Files         176      176           
  Lines       11348    11348           
=======================================
  Hits         8531     8531           
  Misses       2817     2817           
Flag Coverage Δ
unittests 75.17% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@husseinmozannar husseinmozannar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works, tested delete session only, not delete team

@victordibia victordibia enabled auto-merge (squash) March 3, 2025 21:42
@victordibia victordibia merged commit 679a935 into main Mar 3, 2025
50 checks passed
@victordibia victordibia deleted the ags_cascade_delete_vd branch March 3, 2025 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants