Skip to content

Commit

Permalink
Compatible with old version in indexes
Browse files Browse the repository at this point in the history
  • Loading branch information
long2ice committed Aug 31, 2021
1 parent 0178755 commit 661f241
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aerich/migrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@ def diff_models(cls, old_models: Dict[str, dict], new_models: Dict[str, dict], u
new_unique_together = set(
map(lambda x: tuple(x), new_model_describe.get("unique_together"))
)
old_indexes = set(map(lambda x: tuple(x), old_model_describe.get("indexes")))
new_indexes = set(map(lambda x: tuple(x), new_model_describe.get("indexes")))
old_indexes = set(map(lambda x: tuple(x), old_model_describe.get("indexes", [])))
new_indexes = set(map(lambda x: tuple(x), new_model_describe.get("indexes", [])))
old_pk_field = old_model_describe.get("pk_field")
new_pk_field = new_model_describe.get("pk_field")
# pk field
Expand Down

0 comments on commit 661f241

Please sign in to comment.