Room cannot verify the data integrity Android Origin: On your device Last updated 11 Oct 2026

Room cannot verify the data integrity. Looks like you've changed schema but forgot to update the version number

The Room entity definitions changed, but the database version wasn’t increased or no migration was provided.

Exact message you may see Room cannot verify the data integrityLooks like you've changed schema but forgot to update the version numberA migration from 2 to 3 was required but not foundMigration didn't properly handle
Seen on: Android

Meaning

Room stores a schema hash. Changing entities requires bumping @Database(version) and adding a Migration (or fallbackToDestructiveMigration for dev builds). During development, uninstalling the app also resets it.

Common causes

  • Entity fields/tables changed without version bump
  • Migration missing for the new version
  • Two builds with different schemas on the same device

⚡ Quick fix

  1. Increase version and add a Migration
  2. Use fallbackToDestructiveMigration() only when data loss is OK
  3. Export schemas (room.schemaLocation) to auto-generate migrations

Detailed fix by platform

Kotlin

  1. kotlin
    @Database(entities = [User::class], version = 3, autoMigrations = [AutoMigration(from = 2, to = 3)])
    abstract class AppDb : RoomDatabase()

How to diagnose

  1. Version — @Database version vs installed
  2. Migrations — Path from old to new

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: On your device. Errors that are often confused with or caused by this one (click to open):

1022 — MySQL ERROR 1022 (23000): Can't write; duplicate key in table (MySQL)10221051 — MySQL ERROR 1051 (42S02): Unknown table 'x' (MySQL)10511060 — MySQL ERROR 1060 (42S21): Duplicate column name 'x' (MySQL)10601061 — MySQL ERROR 1061 (42000): Duplicate key name 'x' (MySQL)10611091 — MySQL ERROR 1091 (42000): Can't DROP 'x'; check that column/key exists (MySQL)10911146 — MySQL ERROR 1146 (42S02): Table 'db.table' doesn't exist (MySQL)11462BP01 — ERROR: cannot drop table x because other objects depend on it (PostgreSQL)2BP0142701 — ERROR: column "x" of relation "y" already exists (PostgreSQL)42701Room cann…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.