pub fn init_db(conn: &Connection) -> Result<()>Expand description
Initialize the database: create tables if needed, then run migrations.
This is the single entry point used by all frontends. It auto-detects
fresh databases (version 0) and existing databases, running the migration
chain to bring them up to [CURRENT_SCHEMA_VERSION].