XataX
Xata3y ago
7 replies
Eusebio Trigo

Exploring Migrations

Hi team,
I'm exploring the migrations API so I can update all my branches with the latest schema (using branches in a multi-tenant approach). Some time ago I could use "xataApiClient.migrations.getBranchSchemaHistory" or https://xata.io/docs/api-reference/db/db_branch_name/schema/history#query-schema-history to query all the migrations that were applied to a branch.
Now, i'm getting a 500 error in some branches and the list of changes in other branches. I have several RequestIDs if they come helpful for you.

fbc58bc0-20d1-93f9-85f5-d8dde259cc2f
30629f5c-36d3-9a8f-9230-057503608b5f

They all just come back as:
status: 500, errors: [ { message: 'Internal Error (RequestID: 30629f5c-36d3-9a8f-9230-057503608b5f)', status: 500 } ], requestId: '30629f5c-36d3-9a8f-9230-057503608b5f', cause: undefined
From other branches I can output something like:
Database fc2c3fca-d71d-4657-b6d5-53da8d807de0 does not need to be updated Commit mig_cfscsaplsg2bukjkiiog was applied on 2023-02-24T14:48:11.396059Z Commit mig_cfeikv6481ilejqfj0ug was applied on 2023-02-03T15:38:36.792671Z

Thanks in advance for your help!
Xata
Query the branch its schema history.
Query schema history. | Xata
Was this page helpful?