title: Room cannot verify the data integrity. How can I fix it without writing migration steps?
body: <p>I have room setup on production app.
  I have made many schema related changes to multiple tables in my app.</p>
  
  <p>Before shipping to production build, I have made sure of the following</p>
  
  <ol>
  <li>Increase database version</li>
  <li>have <code>exportSchema = false</code> in <code>@Database</code> annotation line</li>
  <li>allowBackup to false in manifest <code>&lt;application android:allowBackup="false" /&gt;</code></li>
  <li>have <code>.fallbackToDestructiveMigration()</code> while creating database</li>
  <li>have <code>.fallbackToDestructiveMigrationOnDowngrade()</code> while creating database</li>
  <li>have <code>.enableMultiInstanceInvalidation()</code> while creating database</li>
  </ol>
  
  <p>App crashes with the following stacktrace.</p>
  
  <pre><code>java.lang.IllegalStateException: Room cannot verify the data integrity. Looks like you've changed schema but forgot to update the version number. You can simply fix this by increasing the version number.
  </code></pre>
  
  <p>For development I can clear app cache and data, but how to fix this in production? <strong>I do not wish to write migration steps as there are multiple changes in schema and tables.</strong></p>
  
  <p>I have read <a href="https://medium.com/androiddevelopers/understanding-migrations-with-room-f01e04b07929" rel="nofollow noreferrer">excellent article</a>, but it's not helpful. What are my options?</p>
  
  <p>stacktrace</p>
  
  <pre><code>Fatal Exception: java.lang.RuntimeException: Exception while computing database live data.
     at androidx.room.RoomTrackingLiveData$1.run + 92(RoomTrackingLiveData.java:92)
     at java.util.concurrent.ThreadPoolExecutor.runWorker + 1167(ThreadPoolExecutor.java:1167)
     at java.util.concurrent.ThreadPoolExecutor$Worker.run + 641(ThreadPoolExecutor.java:641)
     at java.lang.Thread.run + 764(Thread.java:764)
  </code></pre>
  
  <p>/////////////////////////////</p>
  
  <pre><code>Caused by java.lang.IllegalStateException: A migration from 19 to 20 was required but not found. Please provide the necessary Migration path via RoomDatabase.Builder.addMigration(Migration ...) or allow for destructive migrations via one of the RoomDatabase.Builder.fallbackToDestructiveMigration* methods.
     at androidx.room.RoomOpenHelper.onUpgrade + 101(RoomOpenHelper.java:101)
     at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper$OpenHelper.onUpgrade + 124(FrameworkSQLiteOpenHelper.java:124)
     at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked + 398(SQLiteOpenHelper.java:398)
     at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase + 298(SQLiteOpenHelper.java:298)
     at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper$OpenHelper.getWritableSupportDatabase + 92(FrameworkSQLiteOpenHelper.java:92)
     at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper.getWritableDatabase + 53(FrameworkSQLiteOpenHelper.java:53)
     at androidx.room.RoomDatabase.inTransaction + 452(RoomDatabase.java:452)
     at androidx.room.RoomDatabase.assertNotSuspendingTransaction + 275(RoomDatabase.java:275)
     at androidx.room.RoomDatabase.query + 304(RoomDatabase.java:304)
     at androidx.room.util.DBUtil.query + 54(DBUtil.java:54)
     at com.xxx.data.local.banner.BannerDao_Impl$4.call + 218(BannerDao_Impl.java:218)
     at com.xxx.data.local.banner.BannerDao_Impl$4.call + 215(BannerDao_Impl.java:215)
     at androidx.room.RoomTrackingLiveData$1.run + 90(RoomTrackingLiveData.java:90)
     at java.util.concurrent.ThreadPoolExecutor.runWorker + 1167(ThreadPoolExecutor.java:1167)
     at java.util.concurrent.ThreadPoolExecutor$Worker.run + 641(ThreadPoolExecutor.java:641)
     at java.lang.Thread.run + 764(Thread.java:764)
  </code></pre>