I didn't find any answer to what I'm searching for so I'm sending this question.
I am using Room for Android.
I have an Entity with an Int column and I need to change it to Double, and I don't know how to do it.
Does anybody know how to do it?
My question might be dumb, but I didn't find any answer on stackoverflow/any google search.
You need to create new table with the new schema. Copy data from old table to the new one. Drop old table. Rename new table to the name of old table.
Here you've got nice article about that: https://medium.com/androiddevelopers/understanding-migrations-with-room-f01e04b07929
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With