Status Update
Comments
pa...@outlook.com <pa...@outlook.com> #2
Hi. Thanks for reporting this. Fixed in alpha-04
da...@google.com <da...@google.com>
pa...@outlook.com <pa...@outlook.com> #3
Branch: androidx-main
commit e782987543a9f8ccd485e970ddc74564b24378db
Author: Vighnesh Raut <vighnesh.raut13@gmail.com>
Date: Mon Jan 02 15:27:40 2023
fix: tab row crashes when only 1 tab is added
Bug:
Test: Added unit test
Change-Id: I6381dbac304fc1d69d3708c6655f8b595668e93f
M tv/tv-material/src/androidTest/java/androidx/tv/material/TabRowTest.kt
M tv/tv-material/src/main/java/androidx/tv/material/TabRow.kt
pa...@outlook.com <pa...@outlook.com> #4
pa...@outlook.com <pa...@outlook.com> #5
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.tv:tv-material:1.0.0-alpha04
da...@google.com <da...@google.com> #6
Great detective work! You are totally right in that we have a 'key' bug. Specifically we are incorrectly keeping track of 'added columns without complex changes' using the column name, but forgot to also include the table as part of the key.
See:
I'll fix this soon.
ap...@google.com <ap...@google.com> #7
Branch: androidx-main
commit bfa17ff8b0cff84789e11a7efb384ab08c4f91e6
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Thu Sep 23 12:10:59 2021
Don't key auto-migration added columns by name.
This is not needed and causes issues when two columns of the same name are added to two to dofferent tables.
Bug: 200818663
Test: SchemaDifferTest.kt
Relnote: Fixed an issue with auto-migrations not adding new columns when another table in the same auto-migration also had a new column with the same name.
Change-Id: Ia5db52982e050714f224805d9949215b6caeff56
M room/room-compiler/src/main/kotlin/androidx/room/util/SchemaDiffer.kt
M room/room-compiler/src/main/kotlin/androidx/room/writer/AutoMigrationWriter.kt
M room/room-compiler/src/test/kotlin/androidx/room/util/SchemaDifferTest.kt
M room/room-compiler/src/test/kotlin/androidx/room/writer/AutoMigrationWriterTest.kt
da...@google.com <da...@google.com> #8
This is fixed, but sadly didn't make it into 2.4.0-alpha05, it'll be in the next release.
da...@loylap.com <da...@loylap.com> #9
I have a similar
da...@loylap.com <da...@loylap.com> #10
sorry I've commented on the wrong issue and it won't let me delete, please ignore!
Description
Component used: Room Version used: 2.4.0-alpha04 Devices/Android versions reproduced on: Android Pixel 4A
I have an entity where I only added a new column "newColumn" between database version 1 to database version 2
I have configured the database as such
And when I run the app after the new schema files have already been generated, the app crashes and this is the error snippet that shows in the console (formatted for easier reading)
When I attach a debug point to TableInfo it stops at
because the table count is different, which makes sense to be different since I have added a new column to the existing table, but for some reason the migration logic is not account for that even though it is very suggested that auto migrations should work straight away when we just add a new column to an existing table:https://developer.android.com/training/data-storage/room/migrating-db-versions
And the blog as well also discusses straight automigration logic for just adding a new column to exiting tables:https://medium.com/androiddevelopers/room-auto-migrations-d5370b0ca6eb
What am I doing wrong here, or is this a bug? I cannot find anything in the documentation to solve this for myself.