How to apply migrations on postgres in a serverless enviroment?
Hello,
I want to apply postgres migrations to my vercel DB. I see that the push command does not work for postgres and am therefore attempting to use the migrate function like so:
However this does not seem like the best way to do this as that would make it so migrations are applied only one I am attempting to make a call instead of at something like build time as far as I can tell. Additionally, it is additional imports that will have to be loaded in the serverless and/or edge environment. Is there a better way to do this?
3 Replies
you have to migrate the schema to the database
or if you're using pg you would swap out the conection
connection