📜  使用 db django 删除并重新开始 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:15.828000             🧑  作者: Mango

代码示例1
Delete the sqlite database file (often db.sqlite3) in your django project folder (or wherever you placed it)
Delete everything except __init__.py file from migration folder in all django apps
Make changes in your models (models.py).
Run the command python manage.py makemigrations or python3 manage.py makemigrations
Then run the command python manage.py migrate.