fix: migration with duplicate renaming of columns in some cases (#395)
* fix: migration with duplicate renaming of columns in some cases * Update var name * fix downgrade sql error * fix test error * docs: update changelog * Add unittest * Move not change line to origin position * Update sort key to make it more frieldly interactive from multi fields rename * refactor: remove puzzle vars * docs: fix PR links in changelog * fix sort key lambda error
This commit is contained in:
@@ -61,13 +61,14 @@ class Product(Model):
|
||||
name = fields.CharField(max_length=50)
|
||||
view_num = fields.IntField(description="View Num")
|
||||
sort = fields.IntField()
|
||||
is_reviewed = fields.BooleanField(description="Is Reviewed")
|
||||
is_review = fields.BooleanField(description="Is Reviewed")
|
||||
type = fields.IntEnumField(
|
||||
ProductType, description="Product Type", source_field="type_db_alias"
|
||||
)
|
||||
image = fields.CharField(max_length=200)
|
||||
body = fields.TextField()
|
||||
created_at = fields.DatetimeField(auto_now_add=True)
|
||||
is_delete = fields.BooleanField(default=False)
|
||||
|
||||
|
||||
class Config(Model):
|
||||
|
||||
Reference in New Issue
Block a user