mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-24 10:40:07 +08:00
feat(database): enable strict transaction durability for CherryStudio database (#8737)
- Updated the Dexie database initialization to include `chromeTransactionDurability: 'strict'`, enhancing data integrity during transactions.
This commit is contained in:
parent
e76a68ee0d
commit
53aa88a659
@ -6,7 +6,9 @@ import { Dexie, type EntityTable } from 'dexie'
|
||||
import { upgradeToV5, upgradeToV7, upgradeToV8 } from './upgrades'
|
||||
|
||||
// Database declaration (move this to its own module also)
|
||||
export const db = new Dexie('CherryStudio') as Dexie & {
|
||||
export const db = new Dexie('CherryStudio', {
|
||||
chromeTransactionDurability: 'strict'
|
||||
}) as Dexie & {
|
||||
files: EntityTable<FileMetadata, 'id'>
|
||||
topics: EntityTable<{ id: string; messages: NewMessage[] }, 'id'> // Correct type for topics
|
||||
settings: EntityTable<{ id: string; value: any }, 'id'>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user