Add multi-language support and new repository methods for book synchronization
- Extend repository methods to handle API requests for fetching books, chapters, characters, and other entities with multilingual support (`lang: 'fr' | 'en'`). - Add `uploadBookForSync` logic to consolidate and decrypt book data for synchronization. - Refactor schema migration logic to remove console logs and streamline table recreation. - Enhance error handling across database repositories and IPC methods.
This commit is contained in:
@@ -34,14 +34,10 @@ export class DatabaseService {
|
||||
this.db = new sqlite3.Database(dbPath);
|
||||
this.userEncryptionKey = encryptionKey;
|
||||
this.userId = userId;
|
||||
|
||||
// Initialize schema (creates tables if they don't exist)
|
||||
|
||||
initializeSchema(this.db);
|
||||
|
||||
// Run migrations (updates existing tables if needed)
|
||||
|
||||
runMigrations(this.db);
|
||||
|
||||
console.log(`Database initialized for user ${userId} at ${dbPath}`);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user