Skip to main content

migrate_fleet

Function migrate_fleet 

Source
pub async fn migrate_fleet(admin_user_id: Uuid) -> Result<FleetReport, DBError>
Expand description

Migrates every tenant in the directory.

Skips admin_user_id, whose row points at the global database that the ordinary boot migration already handled. Quarantined tenants are retried: quarantine records a failure, it is not a tombstone.

Never seeds. server/seed.sql must not run against a per-user database — an implementer reusing boot-shaped logic here would insert the admin user and global config into every tenant.

§Errors

Only for failures that prevent the run itself: an unreachable global directory, or a missing DATABASE_URL. A tenant that cannot be migrated is quarantined and reported, not raised.