Breaking change announcement for the TypeScript Client v0.23.0
With the release of client@0.23.0 the fallback branch option (XATA_FALLBACK_BRANCH) has been removed.
Why:
In previous versions the fallback branch would be used when working under a git branch that does not have a corresponding Xata branch.
The fallback branch concept was not aligned with branch management features coming next and it also introduced an additional network roundtrip on client instantiation. This flag was deprecated and in this new version it has been removed.
Impact:
After updating from an earlier client version to v0.23.0 or later, in case your project was previously relying on the "fallback branch" option the client may not be able to locate the current relevant branch after the upgrade. You may see an error "database branch [dbname:branchname] not found" from the client.
How to address it:
In order to ensure your project connects to the correct branch every time, set the variable XATA_BRANCH either in the .env file or in an environment variable, to the Xata branch you want it to use.
For example:
- for your development environment in the .env file append the line: XATA_BRANCH=mydevbranch (where mydevbranch is the name of the Xata branch to use for development work).
- for your production environment in your provider of choice, in the Project settings Environment Variables create the variable XATA_BRANCH=main (or the name of your production branch if different) and make sure it is associated with your Production deployment.
Comments
0 comments
Please sign in to leave a comment.