mozukuzuku
mozukuzuku

Reputation: 53

Django 1.8, How to completely reset migrations?

I want to completely reset migrations and database.

How do I delete the migration files of "auth" app.

If I type any command related to migrate, the following error happens:

django.db.migrations.graph.NodeNotFoundError: Migration auth.0007_user_lend_to dependencies reference nonexistent parent node ('account', '0007_deal_is_completed')

Upvotes: 0

Views: 2852

Answers (1)

itzMEonTV
itzMEonTV

Reputation: 20339

If you want migration from scratch.First recreate database.Then

find . -path *migrations* -name "*.py" -not -path "*__init__*" -exec rm {} \; # make sure to be in your projects path
python manage.py makemigrations
python manage.py migrate

Upvotes: 1

Related Questions