You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Max migration file computes incorrect max-migration, in case earlier migrations before installing the library have custom names, not starting with numbers.
#161
Closed
shikhart98 opened this issue
Mar 3, 2022
· 6 comments
· Fixed by #208
Max migration file computes incorrect max-migration, in case earlier migrations before installing the library have custom names, not starting with numbers.
Currently we use max(migration_details.names) in a couple places to find the latest migration. I guess to be strictly correct, we need to change to using Django's MigrationLoader class to build the migration graph, when we can detect the final migration. This would also let us detect conflicts where there are multiple leaf migrations, like migrate does, by calling the loader's detect_conflicts() method.
Python Version
3.8
Django Version
2.2.5
Package Version
2.3.0
Description
Max migration file computes incorrect max-migration, in case earlier migrations before installing the library have custom names, not starting with numbers.
Example:
| - 001.py
| - 002.py
| - custom_migration_name.py
| - 003.py
in above migration folder actual dependency chain is:
001 -> 002 -> custom_migration_name -> 003
But when I am generating max migration file here I am getting
custom_migration_name
value over there, when my actual latest migration is003
.The text was updated successfully, but these errors were encountered: