From 400ae5796dacb6415adfcbc069236b6d4ce48977 Mon Sep 17 00:00:00 2001 From: Elena Gryaznova Date: Fri, 28 Aug 2026 09:23:31 +0200 Subject: [PATCH 1/2] Add a flag to ignore unknown migrations --- ampc-anon-stats/src/store/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ampc-anon-stats/src/store/mod.rs b/ampc-anon-stats/src/store/mod.rs index 54c11cb..373d901 100644 --- a/ampc-anon-stats/src/store/mod.rs +++ b/ampc-anon-stats/src/store/mod.rs @@ -25,7 +25,7 @@ const ANON_STATS_FACE_TABLE: &str = "anon_stats_face"; const ANON_STATS_2D_TABLE_DI: &str = "anon_stats_2d_di"; impl AnonStatsStore { - pub async fn new(postgres_client: &PostgresClient) -> Result { + pub async fn new(postgres_client: &PostgresClient, ignore_missing_migrations: bool) -> Result { tracing::info!( "Created anon-stats-mpc-store with schema: {}", postgres_client.schema_name @@ -35,6 +35,7 @@ impl AnonStatsStore { tracing::info!("Not migrating anon-stats-mpc-store DB in read-only mode"); } else { sqlx::migrate!("./anon_stats_migrations/") + .set_ignore_missing(ignore_missing_migrations) .run(&postgres_client.pool) .await?; } From 2295ef16c3af9b59aa468e1b1942b39be2565336 Mon Sep 17 00:00:00 2001 From: Elena Gryaznova Date: Fri, 28 Aug 2026 09:31:08 +0200 Subject: [PATCH 2/2] Formatting --- ampc-anon-stats/src/store/mod.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ampc-anon-stats/src/store/mod.rs b/ampc-anon-stats/src/store/mod.rs index 373d901..fbc512a 100644 --- a/ampc-anon-stats/src/store/mod.rs +++ b/ampc-anon-stats/src/store/mod.rs @@ -25,7 +25,10 @@ const ANON_STATS_FACE_TABLE: &str = "anon_stats_face"; const ANON_STATS_2D_TABLE_DI: &str = "anon_stats_2d_di"; impl AnonStatsStore { - pub async fn new(postgres_client: &PostgresClient, ignore_missing_migrations: bool) -> Result { + pub async fn new( + postgres_client: &PostgresClient, + ignore_missing_migrations: bool, + ) -> Result { tracing::info!( "Created anon-stats-mpc-store with schema: {}", postgres_client.schema_name