Django - makemigrations - No changes detected

前端 未结 30 1572
伪装坚强ぢ
伪装坚强ぢ 2020-12-02 04:44

I was trying to create migrations within an existing app using the makemigrations command but it outputs \"No changes detected\".

Usually I create new apps using the

30条回答
  •  心在旅途
    2020-12-02 05:40

    In my case, I first added a field to the model, and Django said there're no changes.

    Than I decided to change the "table name" of the model, makemigrations worked. Than I changed table name back to default, and the new field was also there.

    There is a "bug" in django migration system, sometimes it doesn't see the new field. Might be related with date field.

提交回复
热议问题