Yeah, basically that.
Field.db_index is “soft deprecated”, with the docs saying:
Where possible, use the
Meta.indexesoption instead. In nearly all cases,indexesprovides more functionality thandb_index.db_indexmay be deprecated in the future.
However, there has been some debate around whether this will actually go ahead: (Soft-)deprecating `Field.unique` . Creating a ForeignKey with db_index=False is sometimes necessary.
Another thing that I know at least one project does is linting the SQL of migration files, via sqlmigrate, to check for ADD INDEX statements without CONCURRENTLY, among other things. That gives you a stronger guarantee, as it checks what Django is doing under the hood.