The 'migrate' command complains about "model changes that are not yet
reflected in a migration" and suggests to run "makemigrations". On the
other hand the 'makemigrations' command (mistakenly) generates 2
new migrations that should not really exist.
Two model changes caused this issue:
1) The expiration_datetime field of the CourseMode model from the
course_modes app has been renamed to _expiration_datetime, but kept
inside the "expiration_datetime" column. Thus, this change affects the
model class, but not the SQL structure. It confuses django which
proposes to create a migration that drops the expiration_datetime
column and recreates it. We resolve this issue by making sure the
initial migration and the model agree.
2) The default value of the "mode" field from the CourseRegCodeItem
model has been changed from 'audit' to 'honor'. Again, this change only
affect the model class, but not the SQL structure. Since the "mode"
field was created in the 0002 migration, we only need to patch this
migration to make sure the migration files and the model agree.
Note that this patch does not require users to re-run migrations.