migrate
command embeded in the service.
If the database migration fails, the operator will stop the deployment of the new version of the module and will keep the old version running. The database migration is applied as a transaction, so if it fails, the database is not updated and the old version of the module is still able to work with the old schema.
When the database migration is complete, the operator will start the deployment of the new version of the module. It ensures that the new version is running properly before sending traffic to it.
Once the new version is running, the operator will eventually stop the old version of the module and clean up the resources that are not needed anymore.