# AutoMigrationSpec

Artifact: [androidx.room3:room3-runtime](https://developer.android.com/jetpack/androidx/releases/room3) [View Source](https://cs.android.com/search?q=file:androidx/room3/migration/AutoMigrationSpec.kt+class:androidx.room3.migration.AutoMigrationSpec) Added in [3.0.0](https://developer.android.com/jetpack/androidx/releases/room3#3.0.0)

*** ** * ** ***

Common/All
- Cmn

  ```
  interface AutoMigrationSpec
  ```

*** ** * ** ***

Interface for defining an automatic migration specification for Room databases.

The functions defined in this interface will be called on a background thread from the executor set in Room's builder. It is important to note that the functions are all in a transaction when it is called.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/room3/AutoMigration` |   |

## Summary

| ### Public functions |
|---|---|---|
| `open suspend https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/room3/migration/AutoMigrationSpec#onPostMigrate(androidx.sqlite.SQLiteConnection)(connection: https://developer.android.com/reference/kotlin/androidx/sqlite/SQLiteConnection)` Invoked after the migration is completed. | Cmn |

## Public functions

### onPostMigrate

Cmn Added in [3.0.0](https://developer.android.com/jetpack/androidx/releases/room3#3.0.0)

```
open suspend fun onPostMigrate(connection: SQLiteConnection): Unit
```

Invoked after the migration is completed.

| Parameters |
|---|---|
| `connection: https://developer.android.com/reference/kotlin/androidx/sqlite/SQLiteConnection` | The database connection. |