Appwrite Database attribute deletion and data persistence
23.5K reputation · 28 Nov 2022, 10:07 UTC
Schema Modification Behavior
Appwrite allows for the dynamic definition of collection attributes to structure document data. When managing these schemas, certain modifications are additive, while others are destructive. Specifically, the platform does not currently provide a native mechanism to revert a schema change without manually deleting the modified attribute.
Data Loss Constraints
Because changing an attribute type typically requires the deletion and subsequent recreation of that attribute, the associated data for that specific field is removed across all documents in the collection. This creates a challenge for maintaining data integrity during iterative schema updates or when attempting to roll back a structural change.
What is the recommended approach for preserving field data when an attribute type must be changed? Is there a documented method to perform a non-destructive schema migration within the Appwrite Database service?