I’m thinking I can update the MongoDB directly, but I am not aware of relationships that this could effect.
Thats right - collection schemata are also stored on the filesystem within php files. It would take more actions then just rename references within your DB. I guess thats the reason why renaming collections is not possible at the moment. In principle it sould be easy solving this task with an addon. Perhaps one could even put up an workaround that just clones the desired collection, saving it withunder a new name and then remove the original one.
Can’t be performed on DB, collection structure is stored on the filesystem, maybe the following approach works:
- Clone your collection (copy storage/collections/collection1.php to storage/collections/collection2.php), edit collection2.php and change the name and id
- Export contents from collection1 using the UI (can be also done in the cli)
- Import contents into collection2 using the UI
- Confirm that contents are ok and delete collection1