Skip to main content

count_pending_migrations

Function count_pending_migrations 

Source
pub fn count_pending_migrations(data_dir: &Path) -> usize
Expand description

Return the number of REGISTRY migrations that have not yet been applied, reporting 0 on any error so startup is never blocked.

A 0 from this function does not mean the schema is current — it may equally mean the stores could not be read. Callers that need to tell those apart must use try_count_pending_migrations; this one exists for the reporting path (AGENTMUXSRV-ESTART’s pending_migrations: field) where the migration run has already happened and an unreadable store is not a decision point. data_dir must be the wave data dir (parent of db/), not the db dir itself.