Unable to start a pgroll migration using the Xata CLI
Hi 👋
I'm having trouble starting a pgroll v0.11.1 migration using the Xata CLI.
The error I get is:
xata migrate start mybranch db/migrations/pgroll/0000_init.json
I suspect that has to do with the Xata CLI not supporting the newest migration syntax of pgroll. What can I do to work around this issue? Can I use pgroll directly?6 Replies
Hi Michael, thanks for reaching out. You are correct regarding the Xata CLI not supporting the newest migration syntax of pgroll and that's likely the cause of the error. Support for constraints was added in
v0.9.0
of pgroll.
To the best of my knowledge, using pgroll directly with Xata won't work, unfortunately, but let me bring this to the team's attention and see if I can find a workaround.Thanks! Yeah, since we are now using pgroll's convert (which only recently released) we are kind of blocked with the migration workflow that uses pgroll and Xata together.
Also, I've tried it with pgroll in the meantime, but I don't know which table and schema stores the existing migrations and running
pgroll init
doesn't work either (because of shared cluster limitations)Yes exactly, the permissions required by the non-integrated pgroll tool won't allow it to be run with Xata. I appreciate this is a blocker so I'll bring it up with the team.
Hi Michael, thanks for bearing with me.
Unfortunately the version of pgroll in the Xata CLI will stay at
v0.11.1
for the foreseeable future. I appreciate this is a blocker for you and I apologise for any inconvenience caused.
We are currently working on pgroll
as a standalone tool that we will integrate also with our latest offering, coming soon. I'm afraid I can't provide much more detail, or offer an ETA, but you can stay up-to-date at https://xata.io/blogXata blog
Blog posts from the Xata team.
Hi cmck
Sorry, I don't understand. Is the Xata CLI now using
v0.11.1
and will stay on that, or is it using a much earlier version? v0.11.1
would be okay, no?Oh apologies you're dead right, I'm certain that the version in the Xata CLI is older but I must have got the version numbers mixed up, apologies 🤦♂️ let me double check this and get back to you.
Sorry for the confusion, Michael, I got the versions wrong. The Xata CLI uses pgroll
v0.7.0
and will stay on that. Support for constraints was added in v0.9.0