Squash Tagging Migrations [FC-0030] #95
Merged
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 squashes all the migrations from 0001 through 0011 into a single file. The old migrations are kept in place for now, per best practice, but they are unused and can soon be deleted.
Once openedx/edx-platform#33438 is merged, the only migration that edx-platform refers to will be
0012_language_taxonomy
which is kept unchanged as an un-squashed migration. This is nice because it means that after we merge this, we don't have to make any corresponding changes to edx-platform; it won't have any references to any of the squashed migrations. However, we would have to merge a version bump PR to make sure this version of openedx-learning with the squashed PRs is used. I believe the Quince cutoff is scheduled for tomorrow, but I'm hoping we can get this in on time as having the squashed migrations will make things easier to reason about.Why I want to squash the migrations: one of the migrations loaded data from a fixture, which I realize now is a bad practice as it means that changes to the fixture file are not reflected in the migration. In this case we don't even need the fixture any more but deleting it and changing the migration accordingly turned out to produce a string of minor whack-a-mole problems. Likewise, one of the migrations included an import of a mixin that is now deleted, and so the migration actually failed even though we didn't modify it. So we had to change an existing migration just to avoid a bug on new installations of this repo. To resolve all these things cleanly and make things easier, it's best to just squash the migrations.
Once this PR is merged, the tagging app will essentially have only two migrations:
0001_squashed
and0012_language_taxonomy
. Future migrations will start with0013
and proceed from there. But for the time being, we keep copies of the unsquashed migration files until we're sure that nobody has an intermediate state deployed. We can delete them in a week or two.Private-ref: FAL-3477