elsa-workflows / elsa-workflows/elsa-core
[ENH] Make the creation of MongoDB collections and indexes more configurable
- Dominant language
- C#
- Stars
- 7.9k
- Forks
- 1.5k
- Avg merge
- 15h 22m
- Merged PRs (30d)
- 114
Description
### Enhancement Overview
Currently MongoDB collections and their indexes are created through background services that run at application start-up and declare the indexes. These background services are internal, so the cannot be accessed by user code.
This makes it difficult to customize the collections. For example, to add a TTL index for cleanup. Or, if you choose to not use one of the collections (for instance, you don't need workflow execution logs and you use the
`NoopWorkflowExecutionLogStore`, collection `workflow_execution_logs` is still created by the background service).
### Proposed Enhancement
Adding migrations to the MongoDb module, in the form of having a Javascript script that users have to run themselves separately from the application, to create the collecions and indexes. This way, users would be able to customize the script to add new indexes, or remove unused collections.
Contributor guide
Assessment
This issue has not been assessed yet.