Skip to content
Back

Appwrite CLI can't create TABLE"

  • 0
  • Tools
  • Cloud
Zionnite
20 Sep, 2025, 12:05

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.
Zionnite
20 Sep, 2025, 12:05
Zionnite
20 Sep, 2025, 12:07

Please, how can i make this work??

Zionnite
20 Sep, 2025, 12:48

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'
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more