Compatible with old version in indexes

This commit is contained in:
long2ice 2021-08-31 17:53:17 +08:00
parent 01787558d6
commit 661f241dac

View File

@ -192,8 +192,8 @@ class Migrate:
new_unique_together = set( new_unique_together = set(
map(lambda x: tuple(x), new_model_describe.get("unique_together")) map(lambda x: tuple(x), new_model_describe.get("unique_together"))
) )
old_indexes = set(map(lambda x: tuple(x), old_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"))) new_indexes = set(map(lambda x: tuple(x), new_model_describe.get("indexes", [])))
old_pk_field = old_model_describe.get("pk_field") old_pk_field = old_model_describe.get("pk_field")
new_pk_field = new_model_describe.get("pk_field") new_pk_field = new_model_describe.get("pk_field")
# pk field # pk field