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

Error while migrating relations -

Open OmairMedia opened this issue 3 years ago • 1 comments

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)

OmairMedia avatar Sep 22 '22 09:09 OmairMedia

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)

customautosys avatar Oct 05 '22 14:10 customautosys