VersionError: IndexedDB database version is lower than the existing version — what should I do?

An explicit open request asked for a lower version than the database already has. An older tab or cached bundle may still be running after a newer release migrated storage on the same origin. Check the version requested by the running code and the one already on disk.
Keep migration versions moving forward. Coordinate deployments and handle versionchange so old connections can close when a new version needs to open. If an older client sees a database it cannot use, handle that state without attempting a downgrade.
Opening without a version tells you which version is on disk. Check schema compatibility before using that data. Test with an already migrated profile and a tab running the older client.
const request = indexedDB.open('app-db'); // Omit version to open current request.onsuccess = () => console.log('Current version:', request.result.version);
Open a database already migrated by the newer app and verify how the older bundle handles the version it finds.