# 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)

*** ** * ** ***


```
public interface AutoMigrationSpec
```

<br />

*** ** * ** ***

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/androidx/room3/AutoMigration` |   |

## Summary

| ### Public methods |
|---|---|
| `default void` | `https://developer.android.com/reference/androidx/room3/migration/AutoMigrationSpec#onPostMigrate(androidx.sqlite.SQLiteConnection)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/sqlite/SQLiteConnection connection)` Invoked after the migration is completed. |

## Public methods

### onPostMigrate

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

```
default void onPostMigrate(@NonNull SQLiteConnection connection)
```

Invoked after the migration is completed.

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