This only works for me with a simple example application.
If tried that on a system with CMS and different other applications I have always got duplicate key-issues because "migrate --run-syncdb" did always some migrations (at least on django 2.2).
Also a "manage.py flush" after running "migrate --run-syncdb" did not work because of foreign key-problems.
My solution was taking the SQL-output of "manage.py sqlflush" and adding CASCADE to the truncate-statement and running it in the database and than do a "manage loaddata …"
Regards
Karl
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
This only works for me with a simple example application.
If tried that on a system with CMS and different other applications I have always got duplicate key-issues because "migrate --run-syncdb" did always some migrations (at least on django 2.2).
Also a "manage.py flush" after running "migrate --run-syncdb" did not work because of foreign key-problems.
My solution was taking the SQL-output of "manage.py sqlflush" and adding CASCADE to the truncate-statement and running it in the database and than do a "manage loaddata …"
Regards
Karl