Ticket #776 (assigned defect)
Cannot drop index that was created when the table was created.
|Reported by:||tapocol@…||Owned by:||andrew|
To reproduce with MySQL:
- Make a model with a field that has db_index: True
- Generate migration with --initial
- Run Migration
- Remove db_index: True from field settings.
- Generate migration with --auto
- Run Migration to see the error.
db_create_index and db_create_table with a field that has the setting 'db_index' seem to create two different naming styles for the index. db_delete_index uses the naming style used by db_create_index. So, when it is trying to delete the index that was created in db_create_table, MySQL returns the error message "Can't DROP 'xxx_xxx'; check that column/key exists".