hello everyone, i'm trying to create tables via the cli but its not working, it keep saying NO TABLEs FOUND, here are my json structure
profile.json
TypeScript
"$id": "profiles",
"databaseId": "68cda74900313f405a6b",
"name": "Profiles",
"enabled": true,
"rowSecurity": true,
"permissions": [
"read(\"any\")",
"create(\"users[USER_ID]\")",
"update(\"users[USER_ID]\")",
"delete(\"users[USER_ID]\")"
],
"columns": [
{ "key": "userId", "type": "string", "size": 36, "required": true },
{ "key": "username", "type": "string", "size": 50, "required": true },
{ "key": "fullName", "type": "string", "size": 100, "required": true },
{
"key": "bio",
"type": "string",
"size": 500,
"required": false,
"default": ""
},
{
"key": "avatar",
"type": "string",
"size": 255,
"required": false,
"default": null
},
{ "key": "postsCount", "type": "integer", "required": false, "default": 0 },
{
"key": "commentsCount",
"type": "integer",
"required": false,
"default": 0
},
{ "key": "likesCount", "type": "integer", "required": false, "default": 0 },
{ "key": "createdAt", "type": "datetime", "required": true },
{ "key": "updatedAt", "type": "datetime", "required": true }
],
"indexes": [
{
"key": "userId_unique",
"type": "unique",
"columns": ["userId"],
"orders": ["ASC"]
},
{
"key": "username_search",
"type": "fulltext",
"columns": ["username"],
"orders": ["ASC"]
}
]
}
TL;DR
Developers are having trouble creating a table using the Appwrite CLI due to an error stating "Param 'attributes' is not optional." The JSON structure seems correct, but the issue persists.
Solution: The error indicates that the 'attributes' parameter is missing when creating the table. Ensure that all required attributes are included when creating the table to resolve this problem.Please, how can i make this work??
I UPDATED THE appwrite.config.json, under the table object, everything seem to be able to see the table, but i'm having this issue now
TypeScript
ā¹ Info: Pushing table Profiles ( 68cda74900313f405a6b - profiles ) attributes
ā Success: Created 10 columns
ā¹ Info: Creating indexes ...
AppwriteException [Error]: Param "attributes" is not optional.
at Client.call (/usr/local/lib/node_modules/appwrite-cli/lib/client.js:209:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async databasesCreateIndex (/usr/local/lib/node_modules/appwrite-cli/lib/commands/databases.js:2376:16)
at async createIndexes (/usr/local/lib/node_modules/appwrite-cli/lib/commands/push.js:879:9)
at async pushTable (/usr/local/lib/node_modules/appwrite-cli/lib/commands/push.js:1830:13) {
code: 400,
response: 'general_argument_invalid'
Recommended threads
- User Blocked - False Positive
Today I tried to log in to my cloud console and it said the user is blocked and I didn't even receive any email regarding this like what kind of violation is my...
- is `account.get()` safe to be used in th...
I want to user's `id` for authentication. However, a while ago I was told in this server not to use `account.get()` and instead add user preferences for that us...
- Appwrite console is too heavy
The Appwrite console is too heavy And all of my services broken Any support , please