79404143

Date: 2025-01-31 22:53:37
Score: 1.5
Natty:
Report link

So here’s what I ended up with, for now:

I’m using a “template” — an empty database instance that Room sets up with the schema it expects. Then, I compare the “template” with the incoming file using plain old SQL queries and remove columns from the incoming file that aren’t present in the expected schema.

But to me this looks like trying to fit a square peg into a round hole. I think, the proper approach might be one of the following:

  1. Drop Room in favor of a another solution that isn’t so strict with schemas. In my case, I can probably manage with just plain SQL queries.
  2. Change API to serve different files based on the client version.
Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Dmytro