fix(transfer): count tables in rebuild confirm and localize hints

This commit is contained in:
HolyeTyrone authored and GitHub committed 2026-09-09 14:44:35 +08:00
1 parent 4e8a58a08c
commit 894ecdec42
12 files changed
+12 -12

No files matched your search

+1 -8
View File
@@ -239,7 +239,6 @@ pub struct TransferOwnershipPreview {
pub struct TransferRebuildPreview {
pub sql: String,
pub tables: Vec<TransferRebuildPreviewTable>,
pub warnings: Vec<String>,
}
#[derive(Debug, Clone, Serialize)]
@@ -6931,13 +6930,7 @@ async fn build_rebuild_preview(
phases.push(format!("-- 3. Drop backups after success\n{}", drop_statements.join(";\n")));
}
let warnings = if resolved.iter().any(|(_, _, preexisting)| !preexisting) {
vec!["Some target tables do not exist yet and will be created without a backup.".to_string()]
} else {
Vec::new()
};
Ok(TransferRebuildPreview { sql: phases.join("\n\n"), tables, warnings })
Ok(TransferRebuildPreview { sql: phases.join("\n\n"), tables })
}
pub async fn preview_transfer_ownership(