refactor(store,tools): migrate IDs from UUID to bigserial int64
Some checks failed
CI / build-and-test (push) Failing after -31m12s
Some checks failed
CI / build-and-test (push) Failing after -31m12s
All internal entity lookups now use bigserial primary keys (int64) while GUIDs are retained for external/public identification. Updated store functions (TouchProject, UpdateThoughtMetadata, AddThoughtAttachment) to query by id instead of guid, added GetThoughtByID, changed semanticSearch and all tool helpers to use *int64 project IDs, and updated retry/backfill workers to use int64 thought IDs throughout.
This commit is contained in:
@@ -33,7 +33,8 @@ const (
|
||||
)
|
||||
|
||||
type Learning struct {
|
||||
ID uuid.UUID `json:"id"`
|
||||
ID int64 `json:"id"`
|
||||
GUID uuid.UUID `json:"guid"`
|
||||
Summary string `json:"summary"`
|
||||
Details string `json:"details"`
|
||||
Category string `json:"category"`
|
||||
@@ -44,13 +45,13 @@ type Learning struct {
|
||||
ActionRequired bool `json:"action_required"`
|
||||
SourceType string `json:"source_type,omitempty"`
|
||||
SourceRef string `json:"source_ref,omitempty"`
|
||||
ProjectID *uuid.UUID `json:"project_id,omitempty"`
|
||||
RelatedThoughtID *uuid.UUID `json:"related_thought_id,omitempty"`
|
||||
RelatedSkillID *uuid.UUID `json:"related_skill_id,omitempty"`
|
||||
ProjectID *int64 `json:"project_id,omitempty"`
|
||||
RelatedThoughtID *int64 `json:"related_thought_id,omitempty"`
|
||||
RelatedSkillID *int64 `json:"related_skill_id,omitempty"`
|
||||
ReviewedBy *string `json:"reviewed_by,omitempty"`
|
||||
ReviewedAt *time.Time `json:"reviewed_at,omitempty"`
|
||||
DuplicateOfLearningID *uuid.UUID `json:"duplicate_of_learning_id,omitempty"`
|
||||
SupersedesLearningID *uuid.UUID `json:"supersedes_learning_id,omitempty"`
|
||||
DuplicateOfLearningID *int64 `json:"duplicate_of_learning_id,omitempty"`
|
||||
SupersedesLearningID *int64 `json:"supersedes_learning_id,omitempty"`
|
||||
Tags []string `json:"tags"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
@@ -58,7 +59,7 @@ type Learning struct {
|
||||
|
||||
type LearningFilter struct {
|
||||
Limit int
|
||||
ProjectID *uuid.UUID
|
||||
ProjectID *int64
|
||||
Category string
|
||||
Area string
|
||||
Status string
|
||||
|
||||
Reference in New Issue
Block a user