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 schema history. | Xata
Query the branch its schema history.
3 Replies
kostas
kostas2y ago
Thanks for reporting this. We are investigating and will get back to you soon. We have identified the root cause and looking into ways to remediate it. Only a subset of branches, created not very recently, are affected. How urgent is the need to merge ? Asking to determine a course of action (wait until we patch every affected branch or prioritize certain ones) We have resolved the issue for your branches in the impacted database and we are currently fixing all other affected branches. Please let us know in case you encounter any issues getting branch schema history or merging branches.
Eusebio Trigo
Eusebio Trigo2y ago
Oh! That´s great! Thanks!! I am just happy to know that you found it was an issue and you fixed it. Just reran my script and there were no issues at all!
kostas
kostas2y ago
Glad to read this! Thank you very much for confirming.
Want results from more Discord servers?
Add your server