mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-27 07:16:19 +09:00
feat(container): add explicit data workflows and snapshot rollback (#193)
* feat(container): add explicit data workflows and snapshot rollback Make container upgrades and recreation data-safe by adding explicit preserve, export, import, restore, and rollback flows across the backend, SDK, and web UI. * fix(container): resolve go lint issues Fix formatting and lint violations introduced by the container data workflow changes so the Go CI lint job passes cleanly.
This commit is contained in:
@@ -67,7 +67,8 @@ SELECT
|
||||
cv.snapshot_id,
|
||||
cv.version,
|
||||
cv.created_at,
|
||||
s.runtime_snapshot_name
|
||||
s.runtime_snapshot_name,
|
||||
s.display_name
|
||||
FROM container_versions cv
|
||||
JOIN snapshots s ON s.id = cv.snapshot_id
|
||||
WHERE cv.container_id = $1
|
||||
@@ -81,6 +82,7 @@ type ListVersionsByContainerIDRow struct {
|
||||
Version int32 `json:"version"`
|
||||
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
||||
RuntimeSnapshotName string `json:"runtime_snapshot_name"`
|
||||
DisplayName pgtype.Text `json:"display_name"`
|
||||
}
|
||||
|
||||
func (q *Queries) ListVersionsByContainerID(ctx context.Context, containerID string) ([]ListVersionsByContainerIDRow, error) {
|
||||
@@ -99,6 +101,7 @@ func (q *Queries) ListVersionsByContainerID(ctx context.Context, containerID str
|
||||
&i.Version,
|
||||
&i.CreatedAt,
|
||||
&i.RuntimeSnapshotName,
|
||||
&i.DisplayName,
|
||||
); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user