Quantcast
Channel: BugNET Issue Tracker (Moved to GitHub)
Viewing all articles
Browse latest Browse all 2179

Commented Issue: Problem Deleting Projects and Users [85]

$
0
0
When you delete a project or user, I assume there are foreign key contraints which prevent the delete statement from happening.

What should happen, especially on a system such as this, is each relevant table should have an IsDeleted bit column. So when anything in the system is deleted, the flag is marked as true. Therefore when you perform your queries you just make sure that everything shown is not deleted. This keeps data integrity intact and prevents foreign key constant problems.


Log:
System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.Data.SqlClient.SqlException (0x80131904): The DELETE statement conflicted with the REFERENCE constraint "FK_BugNet_IssueVotes_BugNet_Issues". The conflict occurred in database "BugNet", table "dbo.BugNet_IssueVotes", column 'IssueId'.
The DELETE statement conflicted with the REFERENCE constraint "FK_BugNet_Issues_BugNet_ProjectCategories". The conflict occurred in database "BugNet", table "dbo.BugNet_Issues", column 'IssueCategoryId'.
The DELETE statement conflicted with the REFERENCE constraint "FK_BugNet_Issues_BugNet_ProjectStatus". The conflict occurred in database "BugNet", table "dbo.BugNet_Issues", column 'IssueStatusId'.
The DELETE statement conflicted with the REFERENCE constraint "FK_BugNet_Issues_BugNet_ProjectMilestones". The conflict occurred in database "BugNet", table "dbo.BugNet_Issues", column 'IssueMilestoneId'.
The DELETE statement conflicted with the REFERENCE constraint "FK_BugNet_Issues_BugNet_ProjectIssueTypes". The conflict occurred in database "BugNet", table "dbo.BugNet_Issues", column 'IssueTypeId'.
The DELETE statement conflicted with the REFERENCE constraint "FK_BugNet_Issues_BugNet_ProjectResolutions". The conflict occurred in database "BugNet", table "dbo.BugNet_Issues", column 'IssueResolutionId'.
The DELETE statement conflicted with the REFERENCE constraint "FK_BugNet_Issues_BugNet_ProjectPriorities". The conflict occurred in database "BugNet", table "dbo.BugNet_Issues", column 'IssuePriorityId'.
The DELETE statement conflicted with the REFERENCE constraint "FK_BugNet_IssueVotes_BugNet_Issues". The conflict occurred in database "BugNet", table "dbo.BugNet_IssueVotes", column 'IssueId'.
Comments: This particular issue was fixed in the 1.2 release with modifications to the delete project stored procedure. I do agree with your recompilation of logically deleting items, which we have implemented for some tables already.

Viewing all articles
Browse latest Browse all 2179

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>