-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deserialize pre-6.0.0 RegionSnapshot objects (#4721)
Schema update 6.0.0 added the `deleted` column to the region_snapshot table and added the `deleted` field to the RegionSnapshot object. If an old RegionSnapshot was serialized before this schema update (as part of a volume delete) into the `resources_to_clean_up` column of the volume table, _and_ if that volume delete failed and unwound, Nexus will fail to deserialize that column after that schema update + model change if there is another request to delete that volume. Add `#[serde(default)]` to RegionSnapshot's deleting field so that Nexus can deserialize pre-6.0.0 RegionSnapshot objects. This will default to `false` which matches what the ALTER COLUMN's default setting was in the 6.0.0 schema upgrade. Fixes oxidecomputer/customer-support#72
- Loading branch information
Showing
2 changed files
with
122 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters