Resolves #4.
- Added
id INTEGER PRIMARY KEYandparent_id INTEGERtodirectories(removingparent_path TEXTand derivingDirectoryRecord::parent_pathfrompath), indexed byidx_directories_parent_id(parent_id). - Dropped
idx_directories_depth(depth, path)and switchedload_subtree_up_to_depthto aWITH RECURSIVECTE overidx_directories_parent_id. - Replaced
idx_directories_namewith partial indexidx_directories_bloatcovering only the 8 bloat directory names. - Normalized
top_filesonto(id INTEGER PRIMARY KEY, dir_id INTEGER NOT NULL, name TEXT NOT NULL, ..., category INTEGER NOT NULL, UNIQUE(dir_id, name)), removing duplicatedpath,dir_path, andidx_top_files_dir, and bumpedSCHEMA_VERSIONto"3". - Added
FileCategory::from_u8(src/domain/mod.rs) andschema_v3_normalizes_paths_and_drops_redundant_indexes(src/cache/mod.rs).
Verified: cargo fmt --check, cargo clippy --all-targets --all-features -- -D warnings, and cargo test (31 unit + 2 e2e) all pass.