You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MongoDB stores system information in collections that use the .system.* namespace, which MongoDB reserves for internal use. Do not create collections that begin with system.
The text was updated successfully, but these errors were encountered:
masterbater
changed the title
exclude System Collections when enumerating collection names
exclude System Collections listCollectionNames()
Mar 12, 2025
masterbater
changed the title
exclude System Collections listCollectionNames()
exclude System Collections in listCollectionNames()
Mar 12, 2025
Its seems in mongodb driver for nodejs like getCollectionNames like listCollectionNames in php driver will return system collections, so I think its up to laravel-mongodb package to handle this issue and not in the driver
MongoDB stores system information in collections that use the .system.* namespace, which MongoDB reserves for internal use. Do not create collections that begin with system.
https://www.mongodb.com/docs/manual/reference/system-collections/
.system.profile
.system.js
.system.views
Is your feature request related to a problem?
system.views is a systems collection but in laravel includes it in the result which causes issue with testing traits that drops all tables
Other system collection that could in the testing database
.system.profile
.system.js
Describe the solution you'd like
Exclude it when dropping all tables, like using migrate:fresh, testing traits like RefreshDatabase, DatabaseMigration
Additional context
Temporary solution add a custom command, but I strongly think that system collections should be excluded in listCollectionNames
The text was updated successfully, but these errors were encountered: