From 6fd1663d8c27fbfd5adc93a3aa973f78a2eeb719 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Sat, 22 Feb 2025 13:35:17 +0100 Subject: chore(tfstated): change database state id and version id formats to uuidv7 --- pkg/model/state.go | 4 +++- pkg/model/version.go | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'pkg/model') diff --git a/pkg/model/state.go b/pkg/model/state.go index 8e1c277..12f9e83 100644 --- a/pkg/model/state.go +++ b/pkg/model/state.go @@ -2,11 +2,13 @@ package model import ( "time" + + "go.n16f.net/uuid" ) type State struct { Created time.Time - Id int + Id uuid.UUID Lock *string Path string Updated time.Time diff --git a/pkg/model/version.go b/pkg/model/version.go index f07db45..1d15bd1 100644 --- a/pkg/model/version.go +++ b/pkg/model/version.go @@ -3,13 +3,15 @@ package model import ( "encoding/json" "time" + + "go.n16f.net/uuid" ) type Version struct { AccountId string Created time.Time Data json.RawMessage - Id int + Id uuid.UUID Lock *string - StateId int + StateId uuid.UUID } -- cgit v1.2.3