Saturday, May 18, 2013

Re: Help converting from mysql to postgres

I am getting 

IntegrityError: duplicate key value violates unique constraint "catalog_pricing_pkey" 
DETAIL: Key (id)=(8) already exists. 

catalog_pricing_id_seq
Start Value 8
Last Value 1
Increment 1


There are 8 records in table. id 1 through 8

If I reset sequence, last value is set to 1
if I restart sequence, last value is set to 8

On Saturday, May 18, 2013 1:23:04 PM UTC-4, frocco wrote:
Hello

Here are my steps.

python manage.py dumpdata --database=legacy > data.json

python manage.py loaddata  data.json --database=default

IntegrityError: Problem installing fixture 'data.json': Could not load accounts.UserProfile(pk=17): duplicate key value violates unique constraint "accounts_userprofile_user_id_key"
DETAIL:  Key (user_id)=(17) already exists.

In the mysql table, there is only one record with user_id 17

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate