directus-labs / 8-to-9-migration-tool

Automated script to migrate from Directus v8 to Directus v9
1 stars 0 forks source link

Error while migrating relations - #76

Open OmairMedia opened 1 year ago

OmairMedia commented 1 year ago

yes , i have followed these steps :

1) i have created a empty database in mysql 2) import sql dumb files one-by-one 3) ran v8 directus project and got user auth token by api 4) ran v9 new fresh project and got user auth token by api 5) ran migration-tool , its now giving error on migrating relations

image

v8 Database : image

Error Log File While Migration:

V9 =>
/relations
undefined
undefined
V9 <=
400
{
"errors": [
    {
        "message": "Field \"output_destination_id\" in collection \"output_destination_deal_pool\" already has an associated relationship",
        "extensions": {
            "code": "INVALID_PAYLOAD"
        }
    }
]

}

Error: V9 => /relations undefined undefined V9 <= 400 { "errors": [ { "message": "Field \"output_destination_id\" in collection \"output_destination_deal_pool\" already has an associated relationship", "extensions": { "code": "INVALID_PAYLOAD" } } ] }

at file:///C:/Omair%20Folder/Office%20Projects/Directus%20Database%20Migration%20Project/migration-tool/api.js:41:9
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async migrateRelationsData (file:///C:/Omair%20Folder/Office%20Projects/Directus%20Database%20Migration%20Project/migration-tool/tasks/relations.js:116:3)
customautosys commented 1 year ago

I get this: Cannot read properties of undefined (reading 'reduce')

Error log



    V8 =>
    /relations
    [object Object]
    {
    "limit": -1
}
    V8 <=
    401
    {
    "error": {
        "code": 3,
        "message": "Unauthorized request"
    }
}

Error: 
    V8 =>
    /relations
    [object Object]
    {
    "limit": -1
}
    V8 <=
    401
    {
    "error": {
        "code": 3,
        "message": "Unauthorized request"
    }
}

    at file:///home/walfin/Dokumentujo/Github/migration-tool/api.js:18:9
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async getRelationsData (file:///home/walfin/Dokumentujo/Github/migration-tool/tasks/relations.js:40:20)