Accepted
FeedForward needs to manage the lifecycle of various entities (users, courses, assignments) while preserving data integrity and student work. Common operations like "deleting" an account or course need to be handled in a way that:
We have decided to implement a soft deletion pattern across key entities using status fields rather than actual deletion. This includes:
status field to the users table with these possible values:active: Normal accountinactive: Temporarily disabled (can be reactivated)archived: Long-term inactive (preserved for record-keeping)deleted: Soft-deleted (personal data anonymized but references maintained)last_active timestamp field to track user activitystatus field to the courses table:active: Normal stateclosed: No longer accepting new enrollments but viewablearchived: Hidden from normal views but accessible via historydeleted: Soft-deleted, hidden but references maintainedcreated_at and updated_at timestamp fieldsstatus field to the assignments table:draft: Being prepared, not yet visible to studentsactive: Normal state, accepting submissionsclosed: No longer accepting submissions but viewablearchived: Hidden from normal views but accessible via historydeleted: Soft-deleted, hidden but references maintainedcreated_at and updated_at timestamp fieldsThe implementation includes: 1. Adding status and timestamp fields to key tables 2. Creating a migration script to update existing databases 3. Updating UI to show appropriate options based on entity status 4. Implementing reactivation flows for inactive accounts 5. Adding status filtering to queries that retrieve entities