将model层转为迁移文件migration,再将新版本的迁移文件执行,更新数据库。 生成迁移文件 python3 manage.py makemigrations 执行 python3 manage.py migrate