A fresh untyped connection to the same chempal database.
const db = await getMigrationDb();
const rows = await db.getAll("supplier_query_cache");
export async function getMigrationDb(): Promise<IDBPDatabase> {
return openDB(DB_NAME, DB_VERSION);
}
Open the ChemPal database as an untyped
idbhandle for migration steps. UnlikegetDB, this returnsIDBPDatabasewithout the schema generic, so step code can read and write records in stores whose current-schema shape no longer matches the data on disk (renamed stores, old record shapes) using plainstringstore names — no type assertions required. The structural schema is still owned bygetDB'supgrade; this connection never upgrades.