Modify

Ticket #1057 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

PostgreSQL index name differences prevent field indexes from being dropped

Reported by: john@… Owned by: andrew
Priority: major Milestone: 1.0
Component: commands Version: mercurial
Keywords: Cc:

Description

I think the patch for ticket #776 fixed MySQL but broke PostgreSQL in the same way.

Django's postgresql_psycopg2 backend is still using plain column names to build index names, without the digests required to work around MySQL length limits. The change to south.db.generic.create_index_name to use the logic Django uses with all the other backends caused PostgreSQL the same trouble with dropping indexes on single-column fields.

I've overridden create_index_name in south.db.postgresql_psycopg2 so that the unhashed column name is used for both creation and deletion of single-column indexes. The pull request is https://bitbucket.org/andrewgodwin/south/pull-request/40/keep-postgresql-single-column-index-naming.

Attachments

Change History

comment:1 Changed 2 years ago by andrew

  • Status changed from new to closed
  • Resolution set to fixed
  • Milestone set to 1.0

Oops, forgot to mark this as pulled/fixed.

View

Add a comment

Modify Ticket

Action
as closed
Author


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

 
Note: See TracTickets for help on using tickets.