Ticket #533 (assigned defect)

Opened 5 years ago

Last modified 5 years ago

Renaming a table should also rename unique constraints

Reported by: pauloswald@… Owned by: andrew
Priority: minor Milestone: 1.0
Component: databaseapi Version: unknown
Keywords: Cc:


Once a project has built up a South migration history a table rename can be confusing for developers. You may get a django error page that says:

Exception Type: IntegrityError?
Exception Value: duplicate key value violates unique constraint "oldtablename_userprofile_user_id_key"

This will be hard to debug because the oldtablename may not be in the current schema.

The implementation of rename_table doesn't appear to drop/recreate constraints with the new table name.

Change History

comment:1 Changed 5 years ago by andrew

  • Status changed from new to assigned
  • Milestone set to 0.7.3

comment:2 Changed 5 years ago by andrew

  • Milestone changed from 0.7.3 to 1.0
Note: See TracTickets for help on using tickets.