Modify ↓
Ticket #533 (assigned defect)
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: |
Description
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.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
