Hello all,
I have been playing with the realm-cli to export app and copy them to different environments etc.
One thing I find confusing is the following:
- create a realm app in “development” mode so that a client can define the schema etc
- use realm-cli pull --remote=“your app” to export that app to your local machine
- now use realm-cli push --remote=“custr-sw1-mhylq”
Now given that I just exported the app, applied no changes whatsoever to it and then re-import the exact same status again, I would assume the CLI to come back to me saying “no changes detected - I got nothing to do”
It however always seems to detect that there is a schema on the server - and instead of leaving it alone it always seems to want to remove all schema objects and recreate them like so:
— data_sources/mongodb-atlas/your app/User/schema.json
+++ data_sources/mongodb-atlas/your app/User/schema.json
Naturally if you confirm the changes shown above with “Yes” realm-cli comes back with:
“push failed: destructive change not allowed: mongodb sync schema will be deleted”
so once your app is created, you can’t manage it with the realm-cli. It kind of makes it impossible to add additional objects such as functions or triggers on your local machine and push the changes - as the cli always fails because it thinks a schema (that was not touched) needs updating too.
Does anyone have any ideas what is going on?
Stay safe and cheers,
Steve