Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit b2dde00cacbbb6e82822c9d02da233c0589a9609
Author: Elif Bilgin <elifbilgin@google.com>
Date: Wed Nov 24 16:36:19 2021
Converting room-migration from Java to Kotlin.
Test: All tests in the room-migration directory.
Bug: 206858622
Relnote: Converting room-migration from Java to Kotlin.
Change-Id: I2724b688fc6dcd3c632dfe167364924edc5248b9
A room/room-migration/api/restricted_current.ignore
M room/room-compiler/src/main/kotlin/androidx/room/vo/Entity.kt
M room/room-migration/src/main/java/androidx/room/migration/bundle/SchemaEqualityUtil.kt
M room/room-compiler/src/test/kotlin/androidx/room/util/SchemaDifferTest.kt
M room/room-migration/build.gradle
M room/room-migration/src/test/java/androidx/room/migration/bundle/IndexBundleTest.kt
M room/room-migration/api/restricted_current.txt
M room/room-migration/src/main/java/androidx/room/migration/bundle/DatabaseViewBundle.kt
M room/room-migration/src/test/java/androidx/room/migration/bundle/EntityBundleTest.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/DatabaseView.kt
M room/room-migration/src/main/java/androidx/room/migration/bundle/SchemaEquality.kt
M room/room-migration/src/main/java/androidx/room/migration/bundle/BundleUtil.kt
M room/room-migration/src/main/java/androidx/room/migration/bundle/ForeignKeyBundle.kt
M room/room-migration/src/main/java/androidx/room/migration/bundle/IndexBundle.kt
M room/room-migration/src/test/java/androidx/room/migration/bundle/PrimaryKeyBundleTest.kt
M room/room-migration/src/main/java/androidx/room/migration/bundle/PrimaryKeyBundle.kt
M room/room-migration/src/test/java/androidx/room/migration/bundle/FieldBundleTest.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/FtsEntity.kt
M room/room-migration/src/main/java/androidx/room/migration/bundle/EntityBundle.kt
M room/room-migration/src/test/java/androidx/room/migration/bundle/DatabaseViewBundleTest.kt
M room/room-migration/src/main/java/androidx/room/migration/bundle/FtsOptionsBundle.kt
M room/room-migration/src/main/java/androidx/room/migration/bundle/SchemaBundle.kt
M room/room-migration/src/main/java/androidx/room/migration/bundle/FieldBundle.kt
M room/room-migration/src/main/java/androidx/room/migration/bundle/DatabaseBundle.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/Index.kt
M room/room-migration/src/test/java/androidx/room/migration/bundle/ForeignKeyBundleTest.kt
M room/room-migration/src/main/java/androidx/room/migration/bundle/FtsEntityBundle.kt
M room/room-migration/src/test/java/androidx/room/migration/bundle/DatabaseBundleTest.kt
https://android-review.googlesource.com/1902291
Branch: androidx-main
commit b2dde00cacbbb6e82822c9d02da233c0589a9609
Author: Elif Bilgin <elifbilgin@google.com>
Date: Wed Nov 24 16:36:19 2021
Converting room-migration from Java to Kotlin.
Test: All tests in the room-migration directory.
Bug: 206858622
Relnote: Converting room-migration from Java to Kotlin.
Change-Id: I2724b688fc6dcd3c632dfe167364924edc5248b9
A room/room-migration/api/restricted_current.ignore
M room/room-compiler/src/main/kotlin/androidx/room/vo/Entity.kt
M room/room-migration/src/main/java/androidx/room/migration/bundle/SchemaEqualityUtil.kt
M room/room-compiler/src/test/kotlin/androidx/room/util/SchemaDifferTest.kt
M room/room-migration/build.gradle
M room/room-migration/src/test/java/androidx/room/migration/bundle/IndexBundleTest.kt
M room/room-migration/api/restricted_current.txt
M room/room-migration/src/main/java/androidx/room/migration/bundle/DatabaseViewBundle.kt
M room/room-migration/src/test/java/androidx/room/migration/bundle/EntityBundleTest.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/DatabaseView.kt
M room/room-migration/src/main/java/androidx/room/migration/bundle/SchemaEquality.kt
M room/room-migration/src/main/java/androidx/room/migration/bundle/BundleUtil.kt
M room/room-migration/src/main/java/androidx/room/migration/bundle/ForeignKeyBundle.kt
M room/room-migration/src/main/java/androidx/room/migration/bundle/IndexBundle.kt
M room/room-migration/src/test/java/androidx/room/migration/bundle/PrimaryKeyBundleTest.kt
M room/room-migration/src/main/java/androidx/room/migration/bundle/PrimaryKeyBundle.kt
M room/room-migration/src/test/java/androidx/room/migration/bundle/FieldBundleTest.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/FtsEntity.kt
M room/room-migration/src/main/java/androidx/room/migration/bundle/EntityBundle.kt
M room/room-migration/src/test/java/androidx/room/migration/bundle/DatabaseViewBundleTest.kt
M room/room-migration/src/main/java/androidx/room/migration/bundle/FtsOptionsBundle.kt
M room/room-migration/src/main/java/androidx/room/migration/bundle/SchemaBundle.kt
M room/room-migration/src/main/java/androidx/room/migration/bundle/FieldBundle.kt
M room/room-migration/src/main/java/androidx/room/migration/bundle/DatabaseBundle.kt
M room/room-compiler/src/main/kotlin/androidx/room/vo/Index.kt
M room/room-migration/src/test/java/androidx/room/migration/bundle/ForeignKeyBundleTest.kt
M room/room-migration/src/main/java/androidx/room/migration/bundle/FtsEntityBundle.kt
M room/room-migration/src/test/java/androidx/room/migration/bundle/DatabaseBundleTest.kt
da...@google.com <da...@google.com>
do...@traveloka.com <do...@traveloka.com> #3
Hi, we got this issue recently on version 2.2.0. One of our DB never done any migration since 1.0 and crash on 2.2.0.
Unfortunately, i am not able to repro this on the sample project.
So we are fixing the issue by upgrading the version and added an empty migration (seems it is working just fine). Is it the 'correct' approach to fix the issue ?
Thanks.
Unfortunately, i am not able to repro this on the sample project.
So we are fixing the issue by upgrading the version and added an empty migration (seems it is working just fine). Is it the 'correct' approach to fix the issue ?
Thanks.
da...@google.com <da...@google.com> #4
Bumping the version and adding an empty migration is definitely a workaround but we would love to know the root cause so if you can try a bit to reproduce or find more information please let us know.
do...@traveloka.com <do...@traveloka.com> #5
This is the sample project to repro the issue.
Install app with room-1.0.zip -> install room-2.0.zip -> success --> install room 2.2.0 --> failed
Let me know if you have trouble with the sample project. Thanks
Install app with room-1.0.zip -> install room-2.0.zip -> success --> install room 2.2.0 --> failed
Let me know if you have trouble with the sample project. Thanks
[Deleted User] <[Deleted User]> #6
Hi team, is there any update?
da...@google.com <da...@google.com> #7
Hey, thank you so much for the reproducible project. The legacy hash is based on CREATE statements and it looks like that our backwards compatibility logic missed a detail.
In Room 2.2.0 we updated the CREATE INDEX statement to also included IF NOT EXSIST. We remove the latter section when calculating the legacy hash, buuuut turns out that the previous CREATE INDEX statement had two spaces between the CREATE and INDEX words, while the updated statement along with the backward compatibility adjustment makes it have one, causing the hash to be different.
I'll try to fix this soon, might end up in a Room 2.2.3 release.
da...@google.com <da...@google.com>
ap...@google.com <ap...@google.com> #8
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 40e267943a2398b9e4177f2642f9577455821ff6
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Thu Dec 05 09:02:11 2019
Leave extra space between CREATE and INDEX in legacy hash calculation.
When calculating the legacy hash not only must IF NOT EXISTS be removed
from the CREATE INDEX statement, but an extra space has to be preserved
since versions of Room before 2.2 had such typo and is considered
during legacy hash calculations.
Bug: 139306173
Test: ./gradlew vo.DatabaseTest
Change-Id: If1d9ad8f57b4953fb41f938d00a70199038e2266
M room/compiler/src/main/kotlin/androidx/room/vo/Database.kt
M room/compiler/src/test/kotlin/androidx/room/vo/DatabaseTest.kt
https://android-review.googlesource.com/1182358
Branch: androidx-master-dev
commit 40e267943a2398b9e4177f2642f9577455821ff6
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Thu Dec 05 09:02:11 2019
Leave extra space between CREATE and INDEX in legacy hash calculation.
When calculating the legacy hash not only must IF NOT EXISTS be removed
from the CREATE INDEX statement, but an extra space has to be preserved
since versions of Room before 2.2 had such typo and is considered
during legacy hash calculations.
Bug: 139306173
Test: ./gradlew vo.DatabaseTest
Change-Id: If1d9ad8f57b4953fb41f938d00a70199038e2266
M room/compiler/src/main/kotlin/androidx/room/vo/Database.kt
M room/compiler/src/test/kotlin/androidx/room/vo/DatabaseTest.kt
an...@google.com <an...@google.com> #9
da...@google.com <da...@google.com>
do...@traveloka.com <do...@traveloka.com> #10
Thank you for fixing the issue.
Description