Pablo
03/16/2025, 4:01 PMNote: Automated Room migrations rely on the generated database schema for both the old and the new versions of the database. If exportSchema is set to false, or if you have not yet compiled the database with the new version number, then automated migrations fail.
Specifically the part on if you have not yet compiled the database with the new version number. What is refering to? maybe google is telling that we need to open the sqlite file with an external tool and edit the pragma user_version value? Is that mandatory to make room migrations work?Ahmed
03/18/2025, 4:00 PMAutomated Room migrations rely on the generated database schema for both the old and the new versionsVersion are specified like this as can be seen here. Room generates a schema of your database. You can see schemas here. When you build your code, a schema is generated corresponding to version number provided. From the examples you can see that
1.json
refers to version 1 .. all the way upto 14.json
.
if you have not yet compiled the database with the new version numberFrom what we have gathered so far. This means that whenever the db schema changes, you need to bump the version number and compile your code so it can create
x.json
file as,
Automated Room migrations rely on the generated database schema for both the old and the new versions of the database.
Ahmed
03/18/2025, 4:00 PMAutomatedMigrations
to work.