Fix database migration: remove alsa_hardware_volume from INSERT
User's existing database doesn't have the column yet, so INSERT fails. Migration adds column after INSERT runs. Solution: only insert old columns.
This commit is contained in:
1 parent
61688bd1ea
commit
ce72addd90
1 file changed
+2
-2
@@ -60,8 +60,8 @@ impl AudioSettingsStore {
|
||||
alsa_plugin TEXT,
|
||||
alsa_hardware_volume INTEGER NOT NULL DEFAULT 0
|
||||
);
|
||||
INSERT OR IGNORE INTO audio_settings (id, exclusive_mode, dac_passthrough, alsa_hardware_volume)
|
||||
VALUES (1, 0, 0, 0);"
|
||||
INSERT OR IGNORE INTO audio_settings (id, exclusive_mode, dac_passthrough)
|
||||
VALUES (1, 0, 0);"
|
||||
).map_err(|e| format!("Failed to create audio settings table: {}", e))?;
|
||||
|
||||
// Migration: Add new columns if they don't exist (for existing databases)
|
||||
|
||||
Reference in new issue
Block a user