-
Notifications
You must be signed in to change notification settings - Fork 5k
Open
Labels
feature / relationshipsFixes and upgrades for database relationshipsFixes and upgrades for database relationshipsproduct / authFixes and upgrades for the Appwrite Auth / Users / Teams services.Fixes and upgrades for the Appwrite Auth / Users / Teams services.product / databasesFixes and upgrades for the Appwrite Database.Fixes and upgrades for the Appwrite Database.product / messagingFixes and upgrades for the Appwrite Messaging.Fixes and upgrades for the Appwrite Messaging.product / storageFixes and upgrades for the Appwrite Storage.Fixes and upgrades for the Appwrite Storage.sdk / cliFixes and upgrades for the Appwrite CLI.Fixes and upgrades for the Appwrite CLI.
Description
🔖 Enhancement description
Currently, Appwrite supports relationships between collections, but does not offer native relationship support for the Auth (Users) or Storage modules. To link a document to a specific user or a file, developers must use a String ID field and handle data integrity manually.
I am requesting the ability to define formal Relationships/Foreign Keys for:
- Users: Linking a document to a record in the Auth service.
- Storage: Linking a document to a specific file within a Bucket.
Proposed Solution
Extend the "Create Relationship" attribute menu to include two new system-level targets:
- Target: User (Auth) – Automatically validates against existing User IDs.
- Target: File (Storage) – Automatically validates against File IDs within a specified Bucket.
🎤 Pitch
- Auth (Users): Beyond the document owner, many workflows require linking additional users. Example: A "Task" document where one user is the Creator (automatic), but another is linked via a relationship as the Reviewer or Assignee.
- Storage: Ensuring that a "User Profile" document cannot reference a file ID that doesn't exist, or automatically identifying which files are "in use" by the database.
Current Workaround
Manually creating a String attribute to store the ID and performing manual lookups or client-side joins, which lacks referential integrity.
👀 Have you spent some time to check if this issue has been raised before?
- I checked and didn't find similar issue
🏢 Have you read the Code of Conduct?
- I have read the Code of Conduct
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
feature / relationshipsFixes and upgrades for database relationshipsFixes and upgrades for database relationshipsproduct / authFixes and upgrades for the Appwrite Auth / Users / Teams services.Fixes and upgrades for the Appwrite Auth / Users / Teams services.product / databasesFixes and upgrades for the Appwrite Database.Fixes and upgrades for the Appwrite Database.product / messagingFixes and upgrades for the Appwrite Messaging.Fixes and upgrades for the Appwrite Messaging.product / storageFixes and upgrades for the Appwrite Storage.Fixes and upgrades for the Appwrite Storage.sdk / cliFixes and upgrades for the Appwrite CLI.Fixes and upgrades for the Appwrite CLI.