
Hi,
Im trying to update my databases from the CLI. I did a test with one of my dev databases and my data all became n/a
.
What I did was pull the latest collection with appwrite init collection
then push it back up to the same DB. There were no changes to the structure but the data seems to be gone.
The documents are there but everything is n/a
Is there a way to deploy a collection without loosing data?

Deploying collection updates without losing data

Yes, that's expected with the CLI at the moment because the attributes and indexes get wiped and then redeployed. There should be a warning about data loss when deploying.
If you're going to make changes after going to prod, you might want to create scripts using a server SDK

Ah yea. It said you "may" lose data which I assumed would be the case if we changed or removed database attributes. All good though. Thanks 🤙

[SOLVED] Deploying collection updates without losing data

I just did this and blew up my collections. The docs (https://appwrite.io/docs/command-line-deployment#deployCollections) say "The Appwrite CLI also helps you migrate your project's databases and collections from a development server to a production server." I guess that's technically not true since it will wipe your entire production server 😅

it works for the 1st migration 😜
Recommended threads
- Creating a relationship with nested obje...
{ "data": { "name": "DiDi", "type": "Software Development", "userJobs": [{ "$id": "68cbf1e2003612fb13ca", "j...
- Realtime integration with SSR auth
Hey, I have a nextjs website with SSR auth, works great. I use a session client for user verification and an admin client with API key. Both is used with node-...
- Adding "name" column to table creates 2-...
As stated, im adding the "name" column to one table, it adds 4 duplicates. In another table it adds 3 duplicates, and when I delete 1 of them, all duplucates di...
