1. 程式人生 > >You have 13 unapplied migration(s). Your project may not work properly until you apply ...報錯

You have 13 unapplied migration(s). Your project may not work properly until you apply ...報錯

[[email protected] hello]# python manage.py runserver 0.0.0.0:8000 Performing system checks... System check identified no issues (0 silenced). You have 13 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, sessions. Run 'python manage.py migrate' to apply them. March 01, 2018 - 14:48:45 Django version 1.11.8, using settings 'hello.settings' Starting development server at http://0.0.0.0:8000/

Quit the server with CONTROL-C.

解決方法:

執行一下這個:python manage.py migrate

它可以讓我們在修改Model後可以在不影響現有資料的前提下重建表結構。