From 74d9cddcebeebf32b280da2f50ab62ec06152d62 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Thu, 10 Aug 2023 10:30:32 +0200 Subject: [PATCH] make version missing not critical for backward compatibility --- backend/windmill-api/src/db.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/windmill-api/src/db.rs b/backend/windmill-api/src/db.rs index 91aaedb740..77149dc342 100644 --- a/backend/windmill-api/src/db.rs +++ b/backend/windmill-api/src/db.rs @@ -16,6 +16,10 @@ pub type DB = Pool; pub async fn migrate(db: &DB) -> Result<(), Error> { match sqlx::migrate!("../migrations").run(db).await { Ok(_) => Ok(()), + Err(sqlx::migrate::MigrateError::VersionMissing(e)) => { + tracing::error!("Database had been applied more migrations than this container. Please update the container to latest. Not critical, but may cause issues if migration introduced a breaking change. Version missing: {e}"); + Ok(()) + } Err(err) => Err(err), }?;