As through the docs:
You can arrange the annotation processor discussion (room.schemaLocation) to know the Room to export the schema within a folder. Even though it is not necessary, it is a great method to have version tale in your codebase and you should perform that file into your version restriction system (but don't send it with your app!).
So if you don't require to check the schema and you require to get rid of the advice, just add exportSchema = false to your RoomDatabase, as heeds.
@Database(entities = { YourEntity.class }, version = 1, exportSchema = false)
public abstract class AppDatabase extends RoomDatabase {
//...
}
You will receive a .json file in your ../app/schemas/ folder. And it looks something like this:
{
"formatVersion": 1,
"database": {
"version": 1,
"identityHash": "53db508c5248423325bd5393a1c88c03",
"entities": [
{
"tableName": "sms_table",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `message` TEXT, `date` INTEGER, `client_id` INTEGER)",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER"
},
{
"fieldPath": "message",
"columnName": "message",
"affinity": "TEXT"
},
{
"fieldPath": "date",
"columnName": "date",
"affinity": "INTEGER"
},
{
"fieldPath": "clientId",
"columnName": "client_id",
"affinity": "INTEGER"
}
],
"primaryKey": {
"columnNames": [
"id"
],
"autoGenerate": true
},
"indices": [],
"foreignKeys": []
}
],
"setupQueries": [
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, \"53db508c5248423325bd5393a1c88c03\")"
]
}
}
If my opinion is right, you will notice such a file with each database variant update, so that you can simply catch the history of your DB.