Ensure database schemas migration before starting the application

INFORMATION

Cloud provider: Scaleway

ISSUE

I’m struggling finding a long-term solution to ensure database schema migrations when deploying my application.
Whenever I update the application, it needs the up to date schemas.
In Kubernetes world, I would configure an initContainer with the migration script in it to solve the issue.
Qovery doesn’t seem to provide that kind of solution directly using “Create an application”.
Consider I can’t modify the image or code ran to add migration at image startup.

Lifecycle job, with a trigger on Start event (deploy/redeploy environment), doesn’t sound good enough: how can I be sure the lifecycle job starts and ends before the application deployment?

Before suggesting using Helm, I would like to know if there is a hidden feature or something I didn’t find in the documentation or in the console.

Hey @Sryther,

Lifecycle job, with a trigger on Start event (deploy/redeploy environment), doesn’t sound good enough: how can I be sure the lifecycle job starts and ends before the application deployment?
→ you can ensure the right execution order by changing the deployment order within your environment.

check this documentation Deployment Pipeline | Docs | Qovery

Hello @a_carrano, thanks for the hint.
I can read in the documentation the steps will be executed only if previous step(s) is done so it fits perfectly for the situation.
I’ll give it a try!

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.