@@ -249,23 +249,25 @@ export async function createTaskyonDatabase(): Promise<TaskyonDatabase> {
249
249
await db . addCollections ( collections )
250
250
251
251
//here we do te migration from or old storage
252
- import ( 'rxdb-old/plugins/storage-dexie' ) . then ( ( { getRxStorageDexie : getRxStorageDexieOld } ) => {
253
- migrateStorage ( {
254
- database : db as unknown as RxDatabase ,
255
- /**
256
- * Name of the old database,
257
- * using the storage migration requires that the
258
- * new database has a different name.
259
- */
260
- oldDatabaseName : 'taskyondb' ,
261
- oldStorage : getRxStorageDexieOld ( ) , // RxStorage of the old database
262
- batchSize : 500 , // batch size
263
- parallel : false , // <- true if it should migrate all collections in parallel. False (default) if should migrate in serial
264
- afterMigrateBatch : ( /*input: AfterMigrateBatchHandlerInput*/ ) => {
265
- console . log ( 'storage migration: batch processed' )
266
- } ,
267
- } )
268
- } )
252
+ await import ( 'rxdb-old/plugins/storage-dexie' ) . then (
253
+ ( { getRxStorageDexie : getRxStorageDexieOld } ) => {
254
+ void migrateStorage ( {
255
+ database : db as unknown as RxDatabase ,
256
+ /**
257
+ * Name of the old database,
258
+ * using the storage migration requires that the
259
+ * new database has a different name.
260
+ */
261
+ oldDatabaseName : 'taskyondb' ,
262
+ oldStorage : getRxStorageDexieOld ( ) , // RxStorage of the old database
263
+ batchSize : 500 , // batch size
264
+ parallel : false , // <- true if it should migrate all collections in parallel. False (default) if should migrate in serial
265
+ afterMigrateBatch : ( /*input: AfterMigrateBatchHandlerInput*/ ) => {
266
+ console . log ( 'storage migration: batch processed' )
267
+ } ,
268
+ } )
269
+ } ,
270
+ )
269
271
270
272
return db
271
273
}
0 commit comments