-logging
This commit is contained in:
parent
8fed5b4b73
commit
7895728308
@ -257,7 +257,7 @@ export function openDatabase(
|
||||
req.onsuccess = (e) => {
|
||||
req.result.onversionchange = (evt: IDBVersionChangeEvent) => {
|
||||
logger.info(
|
||||
`handling live db version change from ${evt.oldVersion} to ${evt.newVersion}`,
|
||||
`handling versionchange on ${databaseName} from ${evt.oldVersion} to ${evt.newVersion}`,
|
||||
);
|
||||
req.result.close();
|
||||
onVersionChange();
|
||||
@ -274,6 +274,9 @@ export function openDatabase(
|
||||
if (!transaction) {
|
||||
throw Error("no transaction handle available in upgrade handler");
|
||||
}
|
||||
logger.info(
|
||||
`handling upgradeneeded event on ${databaseName} from ${e.oldVersion} to ${e.newVersion}`,
|
||||
);
|
||||
onUpgradeNeeded(db, e.oldVersion, newVersion, transaction);
|
||||
};
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user