-
Notifications
You must be signed in to change notification settings - Fork 53
Make migrations robust #5227
Copy link
Copy link
Open
Labels
1 - BugIncorrect behavior of the productIncorrect behavior of the product1 - EnhancementImprovements or extensions to existing behaviorImprovements or extensions to existing behavior
Milestone
Description
Activity
Metadata
Metadata
Assignees
Labels
1 - BugIncorrect behavior of the productIncorrect behavior of the product1 - EnhancementImprovements or extensions to existing behaviorImprovements or extensions to existing behavior
Migrations are failing quite regularly, and the user is often not notified of the failure until the app tries to access a particular field/table that is not available to it.
This manifests in errors such as the common
Unknown column 'spmerging.status' in 'field listThis issue is due to the the original migration using the field name
mergingstatus:specify7/specifyweb/notifications/migrations/0003_spmerging.py
Line 21 in 1419cd7
Later, we changed the name of this field (among others) to
status:specify7/specifyweb/notifications/migrations/0005_auto_20240530_1512.py
Lines 15 to 19 in 1419cd7
If any migrations between the two fail (so a particular table doesn't exist or another migration was not run), it fails silently.
Reported By: SAIAB, KU, UT Austin, Cal Academy