Skip to content

Conversation

@timgraham
Copy link
Collaborator

Follow up to ce390e8.

@timgraham
Copy link
Collaborator Author

@WaVEV do you remember what we had before this?

# An existing collection must be used on MongoDB 6, otherwise
# the operation will not error when unsupported.
self.connection.get_collection("django_migrations").list_search_indexes()

Was it simply __null rather than django_migrations?

@timgraham timgraham marked this pull request as draft December 12, 2025 01:54
@WaVEV
Copy link
Collaborator

WaVEV commented Dec 12, 2025

@WaVEV do you remember what we had before this?

# An existing collection must be used on MongoDB 6, otherwise
# the operation will not error when unsupported.
self.connection.get_collection("django_migrations").list_search_indexes()

Was it simply __null rather than django_migrations?

The __null was for the index query, for Constraint.validate():
SELECT 1 WHERE EXISTS(subquery checking if a constraint is violated)
Maybe we need to erase this $facet 😬 also, it could be done with $documents at the beginning of the pipeline.

In this case: it makes a query over an always existing collection. So the __null idea wasn't here

@timgraham
Copy link
Collaborator Author

I think we had __null as in the last commit, otherwise why did we have a comment about MongoDB 6 requiring an existing collection?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants