feat: implement bulk delete for MySQL database#23
Merged
Alam-2U merged 1 commit intorelease-ulmofrom Apr 7, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Implements bulk delete and count APIs for user-authored forum content to support feature parity during the MongoDB → MySQL migration (COSMO2-885).
Changes:
- Added public API functions to count and bulk-delete a user’s threads/comments across multiple courses.
- Implemented corresponding backend methods for MongoDB and MySQL.
- Updated
forum.apiexports and bumped package version.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
forum/backends/mysql/api.py |
Adds MySQL implementations for counting and bulk soft-deleting user threads/comments. |
forum/backends/mongodb/api.py |
Adds Mongo backend API wrappers for new count/bulk-delete operations. |
forum/backends/mongodb/threads.py |
Adds Mongo implementation for bulk deleting user threads via forum API. |
forum/backends/mongodb/comments.py |
Adds Mongo implementation for bulk deleting user comments via forum API. |
forum/api/threads.py |
Exposes get_user_threads_count and delete_user_threads at the API layer. |
forum/api/comments.py |
Exposes get_user_comment_count and delete_user_comments at the API layer. |
forum/api/__init__.py |
Re-exports the new API functions in __all__. |
forum/__init__.py |
Bumps version from 0.4.6 → 0.4.7. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mraman-2U
approved these changes
Apr 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Bulk delete functionality is currently implemented only for the MongoDB backend, while the corresponding implementation for the MySQL backend is still pending. As part of the migration from MongoDB to MySQL, it is essential to implement bulk delete support in the MySQL backend to ensure feature parity and consistent behavior across both systems.
Ticket:
COSMO2-885
Related ticket
edx/edx-platform#218