Stanford-Online / edx-platform

The Open edX platform, the software that powers Lagunita!
https://lagunita.stanford.edu
GNU Affero General Public License v3.0
42 stars 18 forks source link

Add missing migration, student course enrollment #816

Closed stvstnfrd closed 6 years ago

stvstnfrd commented 6 years ago

While the software default course mode was correctly set to honor, the database default was still incorrectly set to audit. This meant that while most enrollments were registered successfully, any that followed a code path that neglected to pass in a value for course mode would instead rely on the database's default, which is incorrect for our cases.

This was fixed by running makemigrations, which we presumably should have done when we made the original change [1]. This has probably been broken all this time, potentially as far back as December 2016.

We'll need to correct any erroneous entries with the following SQL:

UPDATE
    student_courseenrollment
SET
    mode = 'honor'
WHERE
    mode = 'audit'
;
dcadams commented 6 years ago

I'm a little confused as I don't see any default value for lagunita or cme.

show columns from student_courseenrollment

I expected to see 'audit' or 'honor'.