Code

Opened 7 years ago

Closed 7 years ago

#3915 closed (duplicate)

manage.py loaddata doesn't update table sequence numbers under Postgres

Reported by: russellm Owned by: russellm
Component: Core (Serialization) Version: master
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

If you are using Postgres and you dump the contents of a database, then load it again using loaddata, the sequence numbers for the dumped table are reset. For some reason, saving the objects as a result of the loaddata doesn't appear to update the sequence numbers.

This manifests as the following error:

ERROR: duplicate key violates unique constraint "myproj_myapp_pkey"
INSERT INTO "myproj_myapp"

being raised when you add the first new object after loading the database contents.

Attachments (0)

Change History (3)

comment:1 Changed 7 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Owner changed from jacob to russellm
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:3 Changed 7 years ago by russellm

  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #3790.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.