migrate

fun migrate(context: Context): Flow<MigrationProgress>

Executes the migration process and emits progress events.

This method runs all configured migration steps sequentially, emitting progress events to track the migration status. Each step's result determines the next action:

  • CONTINUE: Proceed to the next step

  • RERUN: Execute the current step again

  • ABORT: Terminate migration successfully (no error)

The migration process follows this sequence:

  1. Emit MigrationProgress.Started

  2. For each step:

  3. Emit MigrationProgress.Success when all steps complete

  4. Emit MigrationProgress.Error if any step throws an exception

Return

Flow of MigrationProgress events tracking migration status

Parameters

context

Android context for migration operations

See also