Hi
Currently the inspectdb command doesn't take the database indexes into account (Ticket -
#27060). While working on adding this feature, there was some confusion related to the inclusion of the index type.
I have implemented this feature
here but since Django doesn't support introspection of the type of index, currently the generated models have the default (B-tree) index no matter what the type of the actual index in the database may be. So I would like seek some advice on whether it would be a good idea to move ahead with this approach with a comment at the beginning of the generated file with the
other comments and integrate this basic implementation into Django (with an update on the ticket and keeping the ticket open, maybe?).
Or should this be kept on a hold until Django supports introspection of the index type for it's backends (PostgreSQL has this feature with some
concerns about the design) and be done correctly all at once. Once that happens we would either use the correct index type if it is supported by Django, else add a comment informing that the index type is not a match and should be created manually.
Please let me know if any other clarification is required on this. Thanks for any help.
Regards
akki