Index naming seems to have changed in Django 1.5, causes db.delete_index to fail

Description

I just upgraded to Django 1.5 and wanted to use the new index_together feature.

I deleted some db_index=True parameters and added the new Meta-option, then created the migration and (since it is not yet supported) added the index(_together) creation by hand. (I don't think the last part matters)

What happened now is that when migrating South tried to remove the old indexes (which is correct), but used a wrong name for them:

Previous this used Python's builtin hash() function, which has never been guarnteed to be stable across implementations (CPython/Jython/etc.) or 32/64 bitness. However, this in practice it was stable. However, with the impending release of Python 3.3 hash randomizations is enabled by default, which would mean the index name changed between program invocations."

It looks like this is completely breaking all django-south applications that created indexes before Django 1.5 and try do remove them after upgrading to 1.5

I'll try to create a testcase project on GitHub? tomorrow, but I can't guarantee I'll find the time to do it.

I tried to take a look at this today hoping it would be quite an easy fix, but it turns out this seems to be very specific to all the popular SQL servers and I can't just look at the INFORMATION_SCHEMA like in the delete_unique() function.

SQLite seems to be able to list index names, but not their fields.

MySQL and PostgreSQL should be able to do this, but they have their own commands to get an INDEX list.