I’m trying to create a scheduled trigger to drop the database at a certain time of the day.
I can’t find the correct command on the documentation. Is that even possible?
My cluster is an M10 and I use it to demonstrate an application, that’s why I have to drop it daily.
Thanks.
Hi @Felipe_Lima
I don’t think realm will allow you to drop databases from a function.
What you can do is remove all documents via trigger set to system. Won’t that have the same affect?
You can also recreate a cluster via the Atlas API similar to
One final “hack” you can do is to load a dependency of MongoDB Node Js driver and have a plain connection to the database to perform the drop…
Best
Pavel