Migrate brings db up to date with every migration found in fsys, applying
each one exactly once inside its own transaction, in ascending version
order. Already-applied migrations are skipped, so Migrate is safe to call
on every agent startup.
Open creates dataDir if needed and opens the agent's SQLite database
inside it, with foreign keys enforced, WAL journaling, and a busy timeout
so concurrent access waits instead of failing immediately.