Commit Graph

11 Commits

Author SHA1 Message Date
Awais Qureshi
4da29d914d chore: adding migrations related with django-history. (#32935) 2023-08-08 16:04:06 +05:00
Usama Sadiq
8053b7d90c refactor: replace coursekey.course with coursekey.library (#30398) 2022-05-27 15:55:12 +05:00
Jawayria
ce26c8476d chore: Applied lint-amnesty on common/djangoapps 2021-12-13 20:53:36 +05:00
Braden MacDonald
448b75fe7f Add a data migration to copy all course index data into MySQL (Take 3) (#29413)
* feat: Add a data migration to copy all course index data into MySQL

* fix: Don't break the data migration if a course has no published version
2021-11-29 11:27:49 -05:00
connorhaugh
74bda16638 Revert "feat: Add a data migration to copy all course index data into MySQL (#29293)" (#29387)
This reverts commit b5299674d2.
2021-11-22 11:59:56 -05:00
Braden MacDonald
b5299674d2 feat: Add a data migration to copy all course index data into MySQL (#29293) 2021-11-22 10:34:25 -05:00
connorhaugh
b8d49e77cc Revert "feat: Add a data migration to copy all course index data into MySQL"
This reverts commit 43bc683d80.
2021-11-03 13:53:21 -04:00
Braden MacDonald
43bc683d80 feat: Add a data migration to copy all course index data into MySQL 2021-11-03 10:26:03 -04:00
Braden MacDonald
6c85668099 feat: write split modulestore's course indexes to Django/MySQL
Split modulestore persists data in three MongoDB "collections": course_index (list of courses and the current version of each), structure (outline of the courses, and some XBlock fields), and definition (other XBlock fields). While "structure" and "definition" data can get very large, which is one of the reasons MongoDB was chosen for modulestore, the course index data is very small.

This commit starts writing course indexes (active_versions) to both MySQL and Mongo, but continues to read from MongoDB only.

By moving course index data to MySQL / a django model, we get these advantages:
* Full history of changes to the course index data is now preserved
* Includes a django admin view to inspect the list of courses and libraries
* It's much easier to "reset" a corrupted course to a known working state, by using the simple-history revert tools from the django admin.
* The remaining MongoDB collections (structure and definition) are essentially just used as key-value stores of large JSON data structures. This paves the way for future changes that allow migrating courses one at a time from MongoDB to S3, and thus eliminating any use of MongoDB by split modulestore, simplifying the stack.
2021-10-26 10:06:52 -07:00
David Ormsbee
ae124bd554 Revert "feat: store split modulestore's course indexes in Django/MySQL"
This reverts commit 96e5ff8dce.
2021-10-07 15:07:42 -04:00
Braden MacDonald
96e5ff8dce feat: store split modulestore's course indexes in Django/MySQL
Split modulestore persists data in three MongoDB "collections": course_index (list of courses and the current version of each), structure (outline of the courses, and some XBlock fields), and definition (other XBlock fields). While "structure" and "definition" data can get very large, which is one of the reasons MongoDB was chosen for modulestore, the course index data is very small.

By moving course index data to MySQL / a django model, we get these advantages:
* Full history of changes to the course index data is now preserved
* Includes a django admin view to inspect the list of courses and libraries
* It's much easier to "reset" a corrupted course to a known working state, by using the simple-history revert tools from the django admin.
* The remaining MongoDB collections (structure and definition) are essentially just used as key-value stores of large JSON data structures. This paves the way for future changes that allow migrating courses one at a time from MongoDB to S3, and thus eliminating any use of MongoDB by split modulestore, simplifying the stack.
2021-10-07 10:59:47 -04:00