我的django应用程序似乎出现了问题。有两个模型,一个进行了修改,另一个是新增加的。自从这两个更改以来,我的makemigrations
和migrate
一直保持相同的变化,迁移编号不断递增。
当我运行makemigrations
时:
Migrations for 'om':
0033_auto_20200122_0001.py:
- Alter field delivery_date on growerpurchaseorderitem
Migrations for 'accounts':
0105_auto_20200122_0001.py:
- Alter field created on pushtoken
- Alter field push_token on pushtoken
当我进行 migrate
操作时
Synchronizing apps without migrations:
Creating tables...
Running deferred SQL...
Installing custom SQL...
Running migrations:
Rendering model states... DONE
Applying accounts.0105_auto_20200122_0001... OK
Applying om.0033_auto_20200122_0001... OK
我曾试图模拟一个迁移来解决这个问题,但没有成功。这是一个问题,因为任何新的更改都无法在我的模型中注册。
编辑:
显示迁移:
对于我的om
[X] 0030_auto_20200121_2339
[X] 0031_auto_20200121_2343
[X] 0032_auto_20200121_2348
[X] 0033_auto_20200122_0001
为我的账户
[X] 0099_certpdf_expiration_date
[X] 0100_pushtoken
[X] 0101_auto_20200121_2145
[X] 0102_auto_20200121_2339
[X] 0103_auto_20200121_2343
[X] 0104_auto_20200121_2348
[X] 0105_auto_20200122_0001
datetime.now()
? - Klaus D.