id,summary,reporter,owner,description,type,status,component,version,severity,resolution,keywords,cc,stage,has_patch,needs_docs,needs_tests,needs_better_patch,easy,ui_ux 28053,Allow fields to specify arbitrary indexes via db_index=Index(),Marc Tamlyn,Aman Pandey,"Expand `Field.db_index` to allow explicitly setting an index. Syntax would look something like: `HStoreField(db_index=GinIndex())` Changes needed: - Indexes won't necessarily receive fields initially. - Fields are responsible for their own indexes. This is tackled here and has implications for #27859, `_like` indexes on Postgres, and other situations where we customise the indexes. It is possible, but I'm not sure, that `Field.get_indexes()` could also handle unique conditions, but I think it's better kept separately as not all databases consider uniqueness to be an index. - Change to `SchemaEditor.alter_field` so it receives the `to_model`, so that the `Index` can resolve the correct column names. This is extra important for `db_index` being a functional index (see #26167), although that's not currently supported in the current data.",New feature,assigned,"Database layer (models, ORM)",dev,Normal,,indexes migrations,Markus Holtermann,Accepted,1,0,0,1,0,0