migration-tool icon indicating copy to clipboard operation
migration-tool copied to clipboard

Error when Migrating Relations Field id in collection is a primary key

Open banglashi opened this issue 2 years ago • 0 comments

Managed to fix most problems, but got stuck on this one:

    V9 =>
    /relations
    undefined
    undefined
    V9 <=
    400
    {
    "errors": [
        {
            "message": "Field \"id\" in collection \"songs_directus_midis\" is a primary key",
            "extensions": {
                "code": "INVALID_PAYLOAD"
            }
        }
    ]
}
    
Error: 
    V9 =>
    /relations
    undefined
    undefined
    V9 <=
    400
    {
    "errors": [
        {
            "message": "Field \"id\" in collection \"songs_directus_midis\" is a primary key",
            "extensions": {
                "code": "INVALID_PAYLOAD"
            }
        }
    ]
}
    
    at file:///Users/arillo/dev/aibeatz/backups/migration-tool/api.js:41:9
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async migrateRelationsData (file:///Users/arillo/dev/aibeatz/backups/migration-tool/tasks/relations.js:108:3)

Perhaps somebody can point me into the proper direction on how to fix this error when migrating relations? Thanks.

banglashi avatar Feb 26 '23 20:02 banglashi