Reset SQLite database in Django

后端 未结 5 656
孤街浪徒
孤街浪徒 2021-02-01 22:34

I am trying to refactor a Django project. I renamed a couple apps and added a new one, as well as shuffled some models around. I want to clear my database and migrations and sta

5条回答
  •  囚心锁ツ
    2021-02-01 22:48

    Delete database and delete migration files (.py and .pyc) in migrations directory of your app (don't delete __init__.py file). Then run python manage.py makemigrations app and python manage.py migrate.

提交回复
热议问题