https://kotlinlang.org logo
#android
Title
# android
y

yshrsmz

01/28/2019, 1:23 AM
Room creates a json file containing its schema information. If you look at it, you'll find a create statement for each table.
👍 1
l

lawlorslaw

01/28/2019, 1:41 AM
thanks. ya i found that generate class (MyDatabase_Impl.java) which contains all of the create table statements. This is going to make creating migrations way easier. Do you know when those create table statements get generated in this file? Does it happen after you add the Entity class and then try to run the project?
y

yshrsmz

01/28/2019, 1:58 AM
Room's code is generated with Annotation Processor, so its created during app's building phase. Also, Room has a migration test library. https://medium.com/androiddevelopers/testing-room-migrations-be93cdb0d975
👍 1
l

lawlorslaw

01/28/2019, 2:30 AM
yep i just set the MigrationTest class up
thanks for the help
👍 1
26 Views