Question regarding using relational database. I see in this example, It is said that I have to go to aws ui and create tables manually. Is there a way to add db migrations as part of sst?
t
thdxr
11/09/2021, 5:33 AM
You would need to select a migration tool and if you want it to be part of your deploy process you can execute it with
sst.Script
p
Phil Astle
11/09/2021, 10:23 AM
We have DB migration code built into an sst.Script currently. We store a version of the DB schema and check it on update. If it's different, we run through the various migrations to get it up to the latest version. Seems to be working ok atm, but we've not tried anything big yet!
m
Muhammad Ali
11/09/2021, 3:20 PM
@Phil Astle which tool you are using? do you have some examples?
p
Phil Astle
11/09/2021, 3:31 PM
We're not using a tool - just have custom code we wrote to call the relevant UPDATE and ALTER statements, etc.