Currently it's somewhat difficult to process initial data after a flush. You will need to fake the database state...

In my case I'm creating all tables of the project with the migration 0001 and populating with initial data on migration 0002.

After spending a time looking for solutions found that I could achieve the desired result with:
python manage.py flush
python manage.py migrate app 0001 --fake
python manage.py migrate app 0002
python manage.py migrate app --fake

While this works might be confusing (and risky), since django is indeed providing data-migrations, makes sense that after flushing the database one could repopulate the database easily. Since making 'flush' not to delete the data-migrations data seems overly complicated or simply impossible in real-world, makes sense to be able to --force a particular migration without touching others.

Hope to read your comments. Greetings!

--
You received this message because you are subscribed to the Google Groups "Django 
developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/bcb956ac-54b8-22e4-544e-a65c84647bdb%40solucioneslibres.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to