[SOLVED] Invalid document structure: Unknown attribute: "type" when trying to create a database
- 0
- Resolved
- 2
- Self Hosted
- Databases
Hello. I have self hosted instance running on my server and has valid endpoint and most of things are working as should. Installation is fresh install of version 1.8.0. I get error when trying to create a database ' Invalid document structure: Unknown attribute: "type"'. I tried to reinstall appwrite and also I did read docs for help and scrolled some forum posts but no help. What could cause this and how to fix?
And logs show this:
appwrite | [Error] Timestamp: 2025-11-17T19:39:15+00:00
appwrite | [Error] Method: POST
appwrite | [Error] URL: /v1/tablesdb
appwrite | [Error] Type: Appwrite\Extend\Exception
appwrite | [Error] Message: Invalid document structure: Unknown attribute: "type"
appwrite | [Error] File: /usr/src/code/src/Appwrite/Platform/Modules/Databases/Http/Databases/Create.php
appwrite | [Error] Line: 89
Hi! I can help you troubleshoot this issue. This "Unknown attribute: 'type'" error when creating a database typically indicates a mismatch between your Appwrite version and the database schema, or an issue with the database migration after installation. Quick question: Did you migrate from an older Appwrite version to 1.8.0, or is this a completely fresh installation with no previous data? Also, are you seeing any errors in your Appwrite server logs (you can check with docker compose logs appwrite)?
Now that you mentioned I did upgrade from 1.7.x to 1.8.0. I rereaded docs and found out that I missed docker compose exec appwrite migrate. I did that and looks like that resolved my issue.
[SOLVED] Invalid document structure: Unknown attribute: "type" when trying to create a database
Great to hear the migration fixed the issue! 🎉 If you want, I can also review your full Appwrite setup to make sure everything is properly upgraded, stable, and optimized. Since you already ran into a schema mismatch once, it might be good to double-check your containers, env vars, permissions, and database consistency small things that can prevent bigger issues later.
Feel free to message me if you want me to take a look or help you with ongoing Appwrite maintenance. I’m happy to help!
Recommended threads
- Appwrite project paused
I have github student account. The auth has been paused however the database is working fine. I cant see any option to resume from my console panel. It is just ...
- MongoDb Database Breaks integer[] & bigi...
I've got a table with the below column created. When I try to insert the value `[-3408048000]` into it, the dart sdk cloud function call is successful (no error...
- Delete on cascade from Cloud Function
I'm writing a Python function that deletes a user's main row from a table in my database. This row has relationships with other tables that use cascade deletion...