Is it safe to kill and restart a running Flyway migration, or does this risk leaving the database in an inconsistent state?
We would like to run Flyway via a Kubernetes Job
managed by a Helm chart that deletes and re-creates jobs under certain conditions. When a job is deleted, its pod is terminated (even if it's running), resulting in the Flyway process being terminated with SIGTERM. The new job will then create a new pod and start the Flyway process anew.
Is this safe for Flyway and for the databases it manages? Or do we need to find a different way to manage jobs?
We're currently using PostgreSQL and Cloud Spanner.