# ProvidedAutoMigrationSpec

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

*** ** * ** ***


```
@Target(allowedTargets = [AnnotationTarget.CLASS])
@Retention(value = AnnotationRetention.BINARY)
public annotation ProvidedAutoMigrationSpec
```

<br />

*** ** * ** ***

Marks a `https://developer.android.com/reference/androidx/room3/migration/AutoMigrationSpec` class that will be provided to Room at runtime.

An instance of a class annotated with this annotation has to be provided to the Room database using `https://developer.android.com/reference/androidx/room3/RoomDatabase.Builder#addAutoMigrationSpec(androidx.room3.migration.AutoMigrationSpec)`. Room will verify that the spec is provided in the builder and if not, it will throw an exception.