Use the database backend's preferred SQL for dropping indexes.
Review Request #10268 — Created Oct. 23, 2018 and submitted
Django database backends can specify the SQL they want to use for
dropping indexes. We now use this when running on Django 1.7+ to drop
indexes, instead of hard-coding a SQL statement. This primarily impacts
Postgres on Django 2.0+, which adds an
IF EXISTSto the statement
(likely to deal with all the variants in index names that Django has
used over the years for Postgres).
Unit tests pass on Django 1.6 through 1.11 on all supported database
types, and on 2.1 with other pending changes.