Skip to content
Back

appwrite CLI pull creates bad indices

  • 0
  • Self Hosted
  • Tools
Matan
14 Apr, 2025, 11:07

When I use the appwrite CLI to create an appwrite.json with appwrite pull collections --all --force, I get indices that look like this:

TypeScript
                {
                    "key": "obj_types",
                    "type": "key",
                    "status": "available",
                    "attributes": [
                        "obj_types"
                    ],
                    "orders": [
                        null
                    ]
                },

The problem here is the "orders": [null], this is invalid and causes appwrite push collections --all --force to quit with an error. It should be "orders": [].

TL;DR
Issue: When developers use the appwrite CLI to create an `appwrite.json` with `appwrite pull collections --all --force`, the indices generated contain incorrect syntax, specifically `"orders": [null]` instead of the correct form `"orders": []`. Solution: For a fix, developers need to manually adjust the generated `appwrite.json` file to replace `"orders": [null]` with the proper syntax of `"orders": []`.
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