user6605213
user6605213

Reputation:

How to start afresh with a new database in Django?

I deleted my database. I want to start afresh with a new database. How can I do that ? I tried making a new datasource but it gives me an error while applying migrations/or migrating that it couldn't find the tables? Which is true because its an empty database.

A similar scenario would be when some one pulls a version of my code. He wouldn't have migrations or the database (untracked). How would he run the application?

Upvotes: 4

Views: 7341

Answers (1)

MiniGunnR
MiniGunnR

Reputation: 5800

Delete all the folders named 'migrations'. And go to terminal and run ./manage.py makemigrations, ./manage.py migrate --run-syncdb.

Upvotes: 5

Related Questions