Skip to main content

Module m0000_bootstrap

Module m0000_bootstrap 

Source
Expand description

Bootstrap: stamp all pre-framework migrations as applied for existing users.

Any user who has launched AgentMux before the migration framework existed will have the old startup-embedded migrations already applied (via the marker-file system). This step reads those marker files and stamps the corresponding migration IDs into db_migrations so the runner skips them.

For migrations without a deterministic marker file, we check for the presence of the data they produce. If we cannot determine whether a migration ran, we leave it unstamped so it runs (all ported migrations are idempotent and safe to re-run).

This migration itself is idempotent: on second run the db_migrations rows are already present and migration_is_applied returns true before we even get here.

Structsยง

M0000Bootstrap