What is the best way to migrate data in django

Another technique is to use the dumpdata and loaddata arguments to manage.py, killing your database in-between:

  1. python manage.py dumpdata > dump.json
  2. With an external tool, drop any affected tables, or kill the whole db
  3. python manage.py loaddata dump.json

See manage.py docs for more.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)