fix: checklist step 5, secondary-profile migrations and Linux database paths (#390) #394

Merged
maximus merged 5 commits from issue-390-manual-flag-profile-migrations into main 2026-10-07 02:00:03 +00:00
Showing only changes of commit 71147c5083 - Show all commits

View file

@ -851,6 +851,30 @@ mod tests {
}
}
#[test]
fn a_profile_from_v0_15_to_v0_17_gets_its_history_and_nothing_else() {
// State F: created with the current consolidated schema, before #390
// wrote a history. Nothing to apply, so no copy either; the flag is
// still repaired.
let dir = unique_dir("state-f");
let path = create_db(&dir, SECONDARY, &[crate::database::CONSOLIDATED_SCHEMA]);
let category = seed_user_rows(&open(&path));
let report = prepare_at(&path, SECONDARY, &migrations()).unwrap();
assert_eq!(report.catch_up_error, None);
let done = report.catch_up.unwrap();
assert_eq!(done.floor, Some(17));
assert_eq!(done.recorded, versions(1, max_version()));
assert!(done.applied.is_empty());
assert_eq!(done.backup_file, None);
assert_eq!(report.repaired_flags, 1);
let conn = open(&path);
assert_history_complete(&conn, "state F");
assert_eq!(count(&conn, "SELECT category_id FROM transactions"), category);
assert!(!dir.join(MIGRATION_BACKUP_DIR).exists());
}
#[test]
fn the_bilan_data_of_a_v0_9_profile_is_converted() {
for state in released_states().into_iter().filter(|s| s.floor == 10) {