fix(backup): preserve SQL fidelity and recovery safety (#6146)

* fix(backup): preserve incremental auto-vacuum on import

* fix(backup): preserve SQLite scalar values in SQL dumps

* fix(backup): preserve autoincrement high-water marks

* fix(backup): restore valid empty SQL exports

* fix(backup): make restores atomic under retention

* fix(backup): publish safety snapshots atomically

* fix(backup): serialize backup file operations
This commit is contained in:
Thefool authored and GitHub committed 2026-08-13 15:50:07 +08:00
1 parent 1f38c83826
commit dfb2e5235b
2 files changed
+1281 -93

No files matched your search

File diff suppressed because it is too large. Load diff
+1 -1
View File
@@ -2923,7 +2923,7 @@ impl Database {
Self::ensure_model_pricing_seeded_on_conn(&conn)
}
fn ensure_model_pricing_seeded_on_conn(conn: &Connection) -> Result<(), AppError> {
pub(crate) fn ensure_model_pricing_seeded_on_conn(conn: &Connection) -> Result<(), AppError> {
// 每次启动都执行 INSERT OR IGNORE,增量追加新模型;仅修复仍等于旧内置值的定价。
Self::seed_model_pricing(conn)?;
Self::repair_current_model_pricing(conn)