New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed #27060: Extended inspectdb so indexes are added to Meta.indexes. #12712
base: main
Are you sure you want to change the base?
Conversation
Fix for docs test is at #12698. |
Thanks for that pointer, @felixxm. So far, I've:
(Tests are still wonky, I know) I'm a little confused by the postgres-specific options. My initial thought is that I'm going to have to do some sort of mapping from |
Hello @drewbrew, I'm doing some PR cleanup. Do you have time to keep working on this? If yes, would you consider rebasing onto main, resolve conflicts, and flag this PR for review? Thank you! |
When inspecting tables, the process creates a constraints dict that identifies indexes. If we have any such indexes, let's add them to `Meta.indexes` using the base `Index` class. At this point, it does not support identifying the index type and substituting in the proper index class, and I don't believe we have the information at this time to select the right class anyway. Ref: https://code.djangoproject.com/ticket/27060
Also add a comment if the type isn't btree
Let's assume they're default spatial indexes
dc3bda0
to
589b857
Compare
Thanks for the prod, @nessita (and congrats on being the new fellow!). I've rebased it (correctly I hope... a lot changes in 3 years!), but how do I flag for review? Just convert it to a draft and back? |
Thank you @drewbrew. Could you please revert the changes you made to AUTHORS (other than adding your name to it)? |
Also, @drewbrew, would you care commenting in the ticket, specifically replying to the last comment made by @David-Wobrock? |
When inspecting tables, the process creates a constraints dict
that identifies indexes. If we have any such indexes, let's add
them to
Meta.indexes
using the baseIndex
class.At this point, it does not support identifying the index type and
substituting in the proper index class, and I don't believe we have
the information at this time to select the right class anyway.
Ref: https://code.djangoproject.com/ticket/27060