fix: migrate does not recognise attribute changes for string primary key (#428)

* refactor: show warning for unsupported pk field changes

* fix: migrate does not recognise attribute changes for string primary key

* docs: update changelog

* refactor: reduce indents

* chore: update docs
This commit is contained in:
Waket Zheng
2025-02-27 22:23:26 +08:00
committed by GitHub
parent e299f8e1d6
commit a624d1b43b
5 changed files with 77 additions and 27 deletions

View File

@@ -77,6 +77,7 @@ class Product(Model):
class Config(Model):
slug = fields.CharField(primary_key=True, max_length=10)
category: fields.ManyToManyRelation[Category] = fields.ManyToManyField("models.Category")
categories: fields.ManyToManyRelation[Category] = fields.ManyToManyField(
"models.Category", through="config_category_map", related_name="config_set"