# RenameTable

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

*** ** * ** ***

Common/AllAndroid/JVMNative/C/iOSJavaScript
- Cmn

  ```
  @Repeatable
  @Target(allowedTargets = [AnnotationTarget.CLASS])
  @Retention(value = AnnotationRetention.BINARY)
  @OptionalExpectation
  annotation RenameTable
  ```
- android

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

*** ** * ** ***

Repeatable annotation declaring the renamed tables in the new version of an auto migration.

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

## Summary

| ### Nested types |
|---|
| `@https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.annotation/-target/index.html(allowedTargets = [https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.annotation/-annotation-target/-c-l-a-s-s/index.html]) @https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.annotation/-retention/index.html(value = https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.annotation/-annotation-retention/-b-i-n-a-r-y/index.html) annotation https://developer.android.com/reference/kotlin/androidx/room/RenameTable.Entries` Container annotation for the repeatable annotation `https://developer.android.com/reference/kotlin/androidx/room/RenameTable`. |

| ### Public constructors |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/room/RenameTable#RenameTable(kotlin.String,kotlin.String)(fromTableName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, toTableName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` | Cmn android |

| ### Public properties |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/room/RenameTable#fromTableName()` Name of the table in the `https://developer.android.com/reference/kotlin/androidx/room/AutoMigration#from()` version of the database. | Cmn android |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/room/RenameTable#toTableName()` Name of the table in the `https://developer.android.com/reference/kotlin/androidx/room/AutoMigration#to()` version of the database. | Cmn android |

## Public constructors

### RenameTable

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

```
RenameTable(fromTableName: String, toTableName: String)
```

## Public properties

### fromTableName

Cmn android

```
val fromTableName: String
```

Name of the table in the `https://developer.android.com/reference/kotlin/androidx/room/AutoMigration#from()` version of the database.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | Name of the table to rename from. |

### toTableName

Cmn android

```
val toTableName: String
```

Name of the table in the `https://developer.android.com/reference/kotlin/androidx/room/AutoMigration#to()` version of the database.

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | Name of the table to rename to. |