Ticket #1057 (closed defect: fixed)
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.

Oops, forgot to mark this as pulled/fixed.