Hey there, does anyone have a pattern for running ...
# sst
m
Hey there, does anyone have a pattern for running sql migrations as part of the deploy process? We run a Aurora Serverless Postgres DB and would love to run db migrations from our SST app
t
lol @Frank
We were just talking about whether people are using Aurora Serverless
Turns out they are! For your situation, what tool are you using to manage pg migrations?
If you want to fully automate it, you can use this construct to run a function that executes your migrations after deploy: https://docs.serverless-stack.com/constructs/Script However, after trying out that pattern I personally decided running migrations manually from my machine was better in the short term
m
We are currently running migrations from our own machines as well
p
We use Script to create the tables and seed some initial data. As part of that we have a bit of version info about the table schema in there - theory being we could do upgrades to the schema potentially via the same script in the future. It's a new product under development though so how well this idea will work I couldn't say yet..!
m
Awesome @thdxr @Phil that is really helpful. Glad to hear someone is doing it in practice