edx-solutions/edx-platform — pull request #302 by mattdrayer (2014-11-04 04:37:14+00:00)
Title: mattdrayer/api-migrate_transitional_ids: Cleaned up two additional table...

...s

@martynjames @fredsmith @antoviaque -- found a couple more tables containing transitional ids -- user_api_userpreference (key=current_course_id) and mentoring_answer (course_id).

Note that there is a composite unique constraint on mentoring_answer which causes a database exception to be thrown if a duplicate name/student_id/course_id combo is inserted. The script watches for these integrity exceptions during updates and removes the duplicate record(s).