8

I had a duplicate sqlite database. I tried deleting the duplicate but instead deleted both. Is there a way I can generate a new database? The data was not especially important.

1
  • 1
    Surely you would just do the same thing as you did to create it manually, ie manage.py migrate? Commented May 1, 2015 at 17:31

2 Answers 2

8

Install django-extensions which can be used in order to reset the database.

then run

python manage.py reset_db

then

python manage.py migrate

Sign up to request clarification or add additional context in comments.

1 Comment

There is no use for reset_db as there is no database, python manage.py migrate is enough.
4

When you have no database in your project, a simple python manage.py migrate will create a new db.sqlite3 file.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.