-
Notifications
You must be signed in to change notification settings - Fork 11
Description
Is your request related to a problem you have?
Yes. In some scenarios, especially in production environments, we need more control over MongoDB index creation. The current implementation automatically creates indexes via DboConfigurations.TryAddIndexes, which may conflict with existing database management policies or DevOps pipelines.
Describe the solution you'd like
I would like to propose the addition of a configuration parameter (e.g., SkipIndexCreation or ManageIndexesExternally) that allows skipping the automatic creation of indexes. When enabled, the library would only create the collections but leave index management to the client application or external tooling.
Are you able to help bring it to life and contribute with a Pull Request?
Yes
Additional context
This feature would be particularly useful for teams that manage indexes via migrations, infrastructure-as-code tools, or centralized database governance. It would also help avoid potential conflicts or redundant index creation in environments where indexes are already defined.
I would be happy to contribute a PR with this enhancement, including the necessary configuration options and conditional logic in the TryAddIndexes method.