mirror of
https://github.com/containers/podman.git
synced 2025-08-06 03:19:52 +08:00
sqlite_state: Fix RewriteVolumeConfig
The VolumeConfig table does not have an ID column, thus use the Name column to update it. Fixes #23052 Signed-off-by: Marius Hoch <mail@mariushoch.de>
This commit is contained in:
@ -1310,7 +1310,7 @@ func (s *SQLiteState) RewriteVolumeConfig(volume *Volume, newCfg *VolumeConfig)
|
||||
}
|
||||
}()
|
||||
|
||||
results, err := tx.Exec("UPDATE VolumeConfig SET Name=?, JSON=? WHERE ID=?;", newCfg.Name, json, volume.Name())
|
||||
results, err := tx.Exec("UPDATE VolumeConfig SET Name=?, JSON=? WHERE Name=?;", newCfg.Name, json, volume.Name())
|
||||
if err != nil {
|
||||
return fmt.Errorf("updating volume config table with new configuration for volume %s: %w", volume.Name(), err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user