From 121bdbd614fe6b26c1aa88f721b0ad88d4d5d9c6 Mon Sep 17 00:00:00 2001 From: "Entropy.Xu" Date: Sat, 9 May 2026 22:26:31 +0800 Subject: [PATCH] fix(data): avoid duplicate user group migration version --- ...user_groups.sql => 20260509120000_add_user_groups.sql} | 0 ...user_groups.sql => 20260509120000_add_user_groups.sql} | 0 ...user_groups.sql => 20260509120000_add_user_groups.sql} | 0 crates/aether-data/src/lifecycle/bootstrap/postgres.rs | 2 +- crates/aether-data/src/lifecycle/migrate/tests.rs | 8 ++++++-- 5 files changed, 7 insertions(+), 3 deletions(-) rename crates/aether-data/migrations/mysql/{20260509000000_add_user_groups.sql => 20260509120000_add_user_groups.sql} (100%) rename crates/aether-data/migrations/postgres/{20260509000000_add_user_groups.sql => 20260509120000_add_user_groups.sql} (100%) rename crates/aether-data/migrations/sqlite/{20260509000000_add_user_groups.sql => 20260509120000_add_user_groups.sql} (100%) diff --git a/crates/aether-data/migrations/mysql/20260509000000_add_user_groups.sql b/crates/aether-data/migrations/mysql/20260509120000_add_user_groups.sql similarity index 100% rename from crates/aether-data/migrations/mysql/20260509000000_add_user_groups.sql rename to crates/aether-data/migrations/mysql/20260509120000_add_user_groups.sql diff --git a/crates/aether-data/migrations/postgres/20260509000000_add_user_groups.sql b/crates/aether-data/migrations/postgres/20260509120000_add_user_groups.sql similarity index 100% rename from crates/aether-data/migrations/postgres/20260509000000_add_user_groups.sql rename to crates/aether-data/migrations/postgres/20260509120000_add_user_groups.sql diff --git a/crates/aether-data/migrations/sqlite/20260509000000_add_user_groups.sql b/crates/aether-data/migrations/sqlite/20260509120000_add_user_groups.sql similarity index 100% rename from crates/aether-data/migrations/sqlite/20260509000000_add_user_groups.sql rename to crates/aether-data/migrations/sqlite/20260509120000_add_user_groups.sql diff --git a/crates/aether-data/src/lifecycle/bootstrap/postgres.rs b/crates/aether-data/src/lifecycle/bootstrap/postgres.rs index b8ee8f139..0dd384826 100644 --- a/crates/aether-data/src/lifecycle/bootstrap/postgres.rs +++ b/crates/aether-data/src/lifecycle/bootstrap/postgres.rs @@ -7,7 +7,7 @@ use tracing::info; // Generated by build.rs from schema/bootstrap/postgres. pub(crate) static EMPTY_DATABASE_SNAPSHOT_SQL: &str = include_str!(concat!(env!("OUT_DIR"), "/empty_database_snapshot.sql")); -pub(crate) const EMPTY_DATABASE_SNAPSHOT_CUTOFF_VERSION: i64 = 20260509000000; +pub(crate) const EMPTY_DATABASE_SNAPSHOT_CUTOFF_VERSION: i64 = 20260509120000; const PUBLIC_BASE_TABLE_COUNT_SQL: &str = r#" SELECT COUNT(*)::BIGINT diff --git a/crates/aether-data/src/lifecycle/migrate/tests.rs b/crates/aether-data/src/lifecycle/migrate/tests.rs index 252b9237e..65efb95a9 100644 --- a/crates/aether-data/src/lifecycle/migrate/tests.rs +++ b/crates/aether-data/src/lifecycle/migrate/tests.rs @@ -295,6 +295,7 @@ fn empty_database_snapshot_covers_current_cutoff_versions() { 20260507120000, 20260508000000, 20260509000000, + 20260509120000, ] ); } @@ -518,7 +519,8 @@ fn mysql_and_sqlite_migrations_include_enabled_incrementals() { 20260403000000, 20260507120000, 20260508000000, - 20260509000000 + 20260509000000, + 20260509120000 ] ); assert_eq!( @@ -527,7 +529,8 @@ fn mysql_and_sqlite_migrations_include_enabled_incrementals() { 20260403000000, 20260507120000, 20260508000000, - 20260509000000 + 20260509000000, + 20260509120000 ] ); } @@ -1034,6 +1037,7 @@ fn pending_migrations_from_applied_skips_versions_already_applied() { 20260507120000, 20260508000000, 20260509000000, + 20260509120000, ] ); }