Fix for DB table conflict preventing DB update on fresh installs - #7796
Conversation
|
Thanks for the pull request, @bradenmacdonald! I've created OSPR-547 to keep track of it in JIRA. JIRA is a place for product owners to prioritize feature reviews by the engineering development teams. Feel free to add as much of the following information to the ticket:
All technical communication about the code itself will still be done via the Github pull request interface. As a reminder, our process documentation is here. |
|
@bradenmacdonald how can we tell if there's any students using the block yet? |
|
@sarina That's tricky since the $ ./manage.py lms shell --settings=devstack
>>> from mentoring.models import Answer
>>> Answer.objects.filter(course_id="HarvardX/GSE1.1x/3T2014").count()
0 |
|
it seems like it'd be safest to include the data migration, no? @maxrothman thoughts? |
|
@sarina definitely agree. |
|
@sarina Yeah, good point. I'll add it in. |
44ec4b5 to
b996ce0
Compare
|
There shouldn't be any real student answer in problem-builder yet, since the course hasn't started - it would simply have emptied any test instructors would have made. But it doesn't hurt to have the migration yes. LGTM - I also tested on a fresh sandbox that didn't include mentoring or problem-builder, the migrations passed correctly. 👍 |
|
Do you need to merge open-craft/problem-builder#18 and then update the hash here before this merges? |
b996ce0 to
8dc4ecb
Compare
|
@sarina Yep, I've just merged the other PR and updated this hash now. Will merge once the build passes. |
Fix for DB table conflict preventing DB update on fresh installs
Description: Two XBlocks specified in
edx-private.txtboth contain Django apps that try to create a table calledmentoring_answers. This causes South to abort its migrations in some cases, due to the table already existing. Full details are in open-craft/problem-builder#18This fix renames the table used by Problem Builder, so that there is no longer any conflict. It includes a data migration in case any important student data was saved to the old table.
Problem reported by @maxrothman.
JIRA: OSPR-547
Discussions: Fix discussed with @nedbat on HipChat 'dev' channel.
Internal Review: Not done yet
Merge deadline: ASAP since it blocks DB sync on fresh installs.
Partner information: hosted on edx.org (Harvard)
Sandbox: I tested the DB update when neither table existed using http://sandbox2.opencraft.com:18010/
Note: This should not be merged until open-craft/problem-builder#18 is merged, and the hash updated.