Skip to content

Commit

Permalink
chore: remove experiment in the database versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
helciofranco committed Dec 11, 2024
1 parent 99c6655 commit f58fc34
Showing 1 changed file with 0 additions and 29 deletions.
29 changes: 0 additions & 29 deletions packages/app/src/systems/Core/utils/databaseVersioning.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,33 +246,4 @@ export const applyDbVersioning = (db: Dexie) => {
abis: '&contractId',
errors: '&id',
});

// DB VERSION 29
// add table outside of dexie to test if it will be cleaned
db.version(29)
.stores({
vaults: 'key',
accounts: '&address, &name',
networks: '&id, &url, &name, chainId',
connections: 'origin',
transactionsCursors: '++id, address, size, providerUrl, endCursor',
assets: '&name, &symbol',
indexedAssets: 'key, fetchedAt',
abis: '&contractId',
errors: '&id',
})
.upgrade(async (_) => {
// add table outside of dexie to test if it will be corrupted also with dexie FuelDB
const request = await window.indexedDB.open('TestDatabase', 1);
request.onupgradeneeded = (event) => {
const db = (event.target as IDBRequest)?.result;
db.createObjectStore('myTable', { keyPath: 'id' });
};
request.onsuccess = (event: Event) => {
const db = (event.target as IDBRequest).result as IDBDatabase;
const tx = db.transaction('myTable', 'readwrite');
const store = tx.objectStore('myTable');
store.add({ id: 1, name: 'John' });
};
});
};

0 comments on commit f58fc34

Please sign in to comment.