diff --git a/src/storage/baseStorage.ts b/src/storage/baseStorage.ts index 85edfac..176d48c 100644 --- a/src/storage/baseStorage.ts +++ b/src/storage/baseStorage.ts @@ -4,10 +4,10 @@ export class BaseStorage<T extends { id: string }> { protected dexie: Dexie protected tableName: string - constructor(tableName: string, schema: string) { + constructor(tableName: string, schema: string, version = 1) { this.tableName = tableName this.dexie = new Dexie(tableName) - this.dexie.version(1).stores({ + this.dexie.version(version).stores({ [tableName]: schema }) }