In Dexie, when you need to upgrade your schemas or table architectures, you use db.version(X)
method.
The library will then check whether the user's browser has a previous version cached and do the appropriate upgrade steps.
But I cannot find how to read the current user's db version manually.
So for example if write this purposefully breaking code:
// remove this code db.version(1).stores(/* my schema */)
db.version(2).stores(/* my schema */)
The library will politely throw an error saying that the version the user currently has (obviously, 1
) has no schema.
But is there a way to read what version exactly the user has?
It could be useful for debugging!