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
"$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"]
}
]
}
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
ℹ 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
- Local Serverless Function Testing: Are D...
I have followed the instructions to get the CLI working, and have been able to log-in, initialize my project, and created a simple Python function, which calls ...
- Update user email using OTP
Hi, I am trying to implement email update using OTP, there is not password associated with the account. One solution I found online is creating appwrite functio...
- Magic Link token automatically consumed
Hi, I'm using the Magic Link auth system with Appwrite Cloud and I'm running into huge issues getting users to log in successfully. About 9 times out of 10, th...