-
Notifications
You must be signed in to change notification settings - Fork 50
Description
The CreateCollectionChange silently drops valid options allowed by the server (only retaining the validation related ones if defined).
This is a potential source of error as the user may not notice this when defining and running a changeset as the collection would be created without the options being present.
I have raised a PR for fixing this: #78
In the PR I have changed the implementation to issue a runCommand operation instead. This allows all supported database options to be defined in the changeset which are then passed through to the server. This is more future proof than using the driver's CreateCollectionOptions class which evolves over time and requires manually copying each option across.
If you like this approach I am happy to help convert other similar methods to do the same (e.g. createIndex which recently had changes for a similar reason in Issue-74).