#Schema Snapshot not working when going to apply

9 messages · Page 1 of 1 (latest)

viscid tinsel
#

It giving me this error and I got similar one for relation for not being a string but being null

{
    "errors": [
        {
            "message": "\"diff.collections[0].diff[0].lhs\" must be of type object",
            "extensions": {
                "code": "INVALID_PAYLOAD"
            }
        }
    ]
}

Here is the diff:

    "hash": "9974fb03ed472dca130bf994589f4d47754149a5",
    "diff": {
        "collections": [
            {
                "collection": "pages",
                "diff": [
                    {
                        "kind": "E",
                        "path": [
                            "meta",
                            "color"
                        ],
                        "lhs": null,
                        "rhs": "#3399FF"
                    },
...

How can I fix this "must be of type" issue ?

fierce scrollBOT
#

Thanks for posting! This is a community powered server, so you may or may not get an answer based on available help and expertise. To increase your chances of somebody being able to help you, please make sure your question includes the following:

  • An explanation of exactly what you're trying to achieve.
  • Any and all related code or previous attempts.
  • The exact issue or error you are facing.
  • Any screenshots if applicable.

When you're done with this thread, please close it.

(If you have a support agreement and need help, please contact the core team via email.)

earnest lagoon
#

i'm also getting this error

earnest wave
#

We are getting a similar error running the CLI on Directus latest + Postgres

#

Schema Apply fails on one ID column

earnest lagoon
#

The CLI snapshot (with YAML file) worked for me.

I'm only getting the error when using the diff apply API.

viscid tinsel
earnest wave
#

After a lot of trial and error we found that changing the order of the tables in the app was causing the error when applying the schema.