2

I'm switching from the default sqlite3 database to the PostgreSQL database but I'm getting an DETAIL: Key (slug)=(superadmin) already exists. error

the steps i did:

py manage.py dumpdata --natural-foreign --natural-primary -e contenttypes -e auth.permission -e sessions --indent 4 > db.json

python manage.py flush

change database settings to postgres

py manage.py migrate

python manage.py load data dump.json

now I have an empty sqlite3 database and i cant load the data to my Postgres database :(

usef
  • 63
  • 6

0 Answers0