Copy course_id into course_key and remove temporary transition code #138
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.
This is a follow-up to #131. In #131, we deprecated the
Answer.course_idfield and replaced it with a newAnswer.course_keyfield with extended length to accommodate courses with course keys longer than 50 characters (for example some CCX courses on edx.org have course keys longer than 50 characters).This PR includes a migration that copies contents of
course_idcolumn intocourse_key, for anyAnswerobject wherecourse_keyisNULL(these areAnswerobjects that were created before problem-builder v2.6.5 was deployed).NOTE: Before deploying v2.6.6 to production, edX will have to fake this migration and manually copy
course_idvalues intocourse_keyin batches because the productionproblem_builder_answertable is large and performing the migration in one go would degrade performance!Next, this PR also includes a migration that makes the
course_keymandatory and removes transition code that supports bothcourse_idandcourse_keycolumns.The
course_idcolumn is only deprecated at this point, but could safely be dropped in the future.Environments: edx.org and edge.edx.org
JIRA tickets: TNL-5932
Discussions: See https://github.com/edx/edx-platform/pull/14013 and JIRA ticket.
Sandbox URLs:
Built with c733391.
Partner information: hosted on edX Edge (Davidson College)
Testing instructions:
This patch should not change functionality in any way. Verify that long Answer objects still work correctly on the sandbox.
Reviewers