# ProvidedAutoMigrationSpec

# ProvidedAutoMigrationSpec

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

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/room/ProvidedAutoMigrationSpec "View this page in Java")
Common/AllAndroid/JVMNative/C/iOSJavaScript
  - Cmn  

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

*** ** * ** ***

Marks a class as an auto migration spec that will be provided to Room at runtime.

An instance of a class annotated with this annotation has to be provided to Room using`Room.databaseBuilder.addAutoMigrationSpec(AutoMigrationSpec)`. Room will verify that the spec is provided in the builder configuration and if not, an[IllegalArgumentException](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-illegal-argument-exception/index.html)will be thrown.

## Summary

|                                                               ### Public constructors                                                               |
|-----------------------------------------------------------------------------------------------------------------------------------------------------|-----|
| [ProvidedAutoMigrationSpec](https://developer.android.com/reference/kotlin/androidx/room/ProvidedAutoMigrationSpec#ProvidedAutoMigrationSpec())`()` | Cmn |

## Public constructors

### ProvidedAutoMigrationSpec

Cmn  

```
ProvidedAutoMigrationSpec()
```