Ticket #1057 (closed defect: fixed)

Opened 4 years ago

Last modified 4 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:


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.

Change History

comment:1 Changed 4 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.

Note: See TracTickets for help on using tickets.