dimanche 7 février 2016

migrating to mysql in django

I want to migrate from sqlite3 to mysql in django. I used this command:

python manage.py dumpdata > datadump.json

after that I changed setting of my django server and configured it with my new mysql database and then used following command:

python manage.py loaddata datadump.json

but I got this error :

integrityError: Problem installing fixtures: The row in table 'django_admin_log' with primary key '20' has an invalid foregin key: django_admin_log.user_id contains a value '19' that does not have a corresponding value in auth_user.id.

Aucun commentaire:

Enregistrer un commentaire