📅  最后修改于: 2022-03-11 14:45:56.170000             🧑  作者: Mango
# when using sqlite3
python manage.py dumpdata > datadump.json
# after chagne db
python manage.py makemigrations
python manage.py migrate --run-syncdb
python manage.py shell
from django.contrib.contenttypes.models import ContentType
ContentType.objects.all().delete()
quit()
python manage.py loaddata datadump.json