mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2025-12-11 20:15:30 +01:00
feat: add database migration step to ensure schema consistency
- Implemented a migration step in the LibraryManager to ensure the database schema is up to date before proceeding with operations. - This change enhances the reliability of the application by preventing potential schema-related issues during runtime.
This commit is contained in:
parent
ad63cba189
commit
5a6c3eb5a0
@ -418,6 +418,9 @@ impl LibraryManager {
|
||||
let db_path = path.join("database.db");
|
||||
let db = Arc::new(Database::open(&db_path).await?);
|
||||
|
||||
// Run migrations to ensure schema is up to date
|
||||
db.migrate().await?;
|
||||
|
||||
// Get this device's ID for sync coordination
|
||||
let device_id = context
|
||||
.device_manager
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user