I’m trying to use my existing db with the Android Room.
However, one of my tables have a VARCHAR column.
It seems Room only supports TEXT and not VARCHAR. And sqlite doesn’t let to modify column type.
So, is there any way to use the existng table with VARCHAR fields in the Room? Or should I copy the whole table to a new one replacing VARCHAR to TEXT?
Yes, you will definitely need to copy the whole table to a new one and replace VARCHAR by TEXT. And the only way to do it is “outside” room. With the usual SQLite.
You should not need to write migration for
VARCHAR columns. Even though Room uses
TEXT, it’s able to parse
VARCHAR just fine.