SectorLabs / django-postgres-extra

Bringing all of PostgreSQL's awesomeness to Django.
MIT License
695 stars 96 forks source link

[fix]Fixing the bug that causes index migration failure in multi-sche… #231

Open GodWord opened 10 months ago

GodWord commented 10 months ago

I think fixing it this way would be better, because in PostgreSQL, the pg_indexes view within the SQL SELECT indexname, indexdef FROM pg_indexes WHERE tablename = %s is used to display index information for all tables. When you execute this query, it returns indexes for all tables that meet the condition, regardless of whether these tables are within the current schema or not.

Photonios commented 8 months ago

This breaks a lot of tests. I don't disagree with the change, but it has to be done in a way so that it doesn't break the tests (and thus existing functionality).