+
Skip to content

Conversation

hakonschia
Copy link

Proposed Changes

When I got this error from Room it confused me as I copied it into my project, but it didn't compile. It took me a minute to realise that the code in the error is for Java and not Kotlin. Considering the state of Kotlin usage on Android (and that Room is also available for KMP) I think it makes more sense for these example snippets to be in Kotlin

Valid Kotlin code

@RenameTable.Entries(
    RenameTable(fromTableName = "...", toTableName = "...")
)
@DeleteTable.Entries(
    DeleteTable(tableName = "...")
)
@RenameColumn.Entries(
    RenameColumn(tableName = "...", fromColumnName = "...", toColumnName = "...")
)
class KotlinMigration : AutoMigrationSpec

Valid Java code

@RenameTable.Entries(
        @RenameTable(fromTableName = "...", toTableName = "...")
)
@DeleteTable.Entries(
        @DeleteTable(tableName = "...")
)
@RenameColumn.Entries(
        @RenameColumn(tableName = "...", fromColumnName = "...", toColumnName = "...")
)
public class JavaMigration implements AutoMigrationSpec {
}

Testing

This PR is just updating documentation

@hakonschia hakonschia requested a review from dlam as a code owner September 14, 2025 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载