Skip to content

Commit

Permalink
Bump extension 1.3.0 - need to clear idb
Browse files Browse the repository at this point in the history
Rules for what's allowed have changed and old urls will be sitting in there
  • Loading branch information
calpaterson committed Sep 26, 2020
1 parent 01c5a9a commit 68ef0e7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/extension/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.2.0
1.3.0
10 changes: 5 additions & 5 deletions src/extension/src/quarchive-background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { QuarchiveURL, Bookmark, DisallowedSchemeError } from "./value_objects.js"

const SCHEMA_VERSION = 3;
const SCHEMA_VERSION = 4;

// An hour
const PERIODIC_FULL_SYNC_INTERVAL_IN_MINUTES = 60;
Expand Down Expand Up @@ -465,8 +465,8 @@ function disableListeners() {
}
}

function clearVersion2IDBSchema (db: IDBDatabase): void {
console.log("clearing idb schema from version 2");
function clearIDBSchema (db: IDBDatabase): void {
console.log("clearing idb schema");
try {
db.deleteObjectStore("bookmarks");
} catch (e) {
Expand Down Expand Up @@ -504,8 +504,8 @@ if (typeof window !== 'undefined') {
const oldVersion = event.oldVersion;

console.log("running upgrade %d -> %d", oldVersion, db.version);
if (oldVersion < 3) {
clearVersion2IDBSchema(db);
if (oldVersion < 4) {
clearIDBSchema(db);
}
createIDBSchema(db);

Expand Down

0 comments on commit 68ef0e7

Please sign in to comment.