I'm experiencing a critical bug with Appwrite CLI that causes complete data loss when making minor schema changes to relationship attributes.
What I Tried To Do:
Changed a relationship attribute's onDelete property from "setNull" to "restrict" in my appwrite.json:
{
"key": "templateListing",
"type": "relationship",
"onDelete": "restrict" // Changed from "setNull"
}
What Actually Happened:
When running appwrite push collections, the CLI:
- Deleted the entire relationship attribute
- Destroyed all existing relationship data between Templates and TemplateListings
- Failed to recreate the attribute due to caching issues
- Left my database in a broken state with all relationship data permanently lost
Expected Behavior: Changing onDelete behavior should be an in-place schema update that:
- Updates the constraint without touching existing data
- Preserves all existing relationships Only affects future deletion behavior.
Actual Impact:
- Complete data loss of all Template ↔ TemplateListing relationships
- Production database corruption from a simple config change Hours of work to manually restore relationships.
Request:
Please fix the CLI to handle relationship schema changes without data loss. Database systems should never delete user data for configuration changes. This behavior makes Appwrite unsuitable for production use where data integrity is critical.
Environment:
Appwrite CLI: 6.1.0 Database: Cloud hosted
Recommended threads
- Weird permission failure
when creating an account I use following methods: ``` Future<void> register(String email, String password, String username) async { final user = await accoun...
- Appwrite Storage error 503s for automate...
I'm facing error 503s from Appwrite after about 5-6 seconds of making AI requests from my tool with images and files above 20MB (=> not inline base64 used, but ...
- Flutter Android oAuth is no more working
I currently don't get the oAuth login to work in flutter android. it works on ios and on web. but when try to use it on Android, i get to the point where the ca...