fix: Rewrite the vfolder status migration in #1892 #1936
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.
The migration in #1892 requires a manual
alembic stamp
command after running thealembic upgrade
command. This will break many developers and fieldops members.This PR migrates the
vfolders.status
enum column to a VARCHAR(64) column to avoid complex enum value substitution and simplify the migration process.7ff52ff68bfc_detail_vfolder_deletion_status.py
)status_history
column at oncemodels.base.StrEnumType
for stringified enum columnsWarning
If your
./py -m alembic current
says7ff52ff68bfc
, you must downgrade the existing migration first BEFORE applying this PR's commit with a manual stamping afterwards,and then upgrade again AFTER applying this PR's commit (no longer manual stamping required).
If you haven't applied the PR commit f5a8bbf from #1892, you may just simply run the upgrade.
(i.e., when your
./py -m alembic current
does NOT say7ff52ff68bfc
, justgit pull && ./py -m alembic upgrade head
)Checklist: (if applicable)