knowledge_* namespace reserved for future agentic learning tables. memory_* namespace used for facts, events, and entity graph. - knowledge_node → memory_entity (reverted) - knowledge_edge → memory_edge (reverted) - Old provenance DAG (child_sha/parent_sha) renamed to memory_edge_provenance via migration 009 - Kept: runtime queries in versioning.rs, UUID casts, init_schema additions
This commit is contained in:
@@ -50,7 +50,7 @@ impl EntityVersioningService {
|
||||
changed_at,
|
||||
changed_by,
|
||||
COALESCE(fields_changed, '{}') as fields_changed
|
||||
FROM knowledge_node_version
|
||||
FROM memory_entity_version
|
||||
WHERE entity_id = $1
|
||||
ORDER BY version_num DESC
|
||||
"#,
|
||||
@@ -75,7 +75,7 @@ impl EntityVersioningService {
|
||||
changed_at,
|
||||
changed_by,
|
||||
COALESCE(fields_changed, '{}') as fields_changed
|
||||
FROM knowledge_node_version
|
||||
FROM memory_entity_version
|
||||
WHERE entity_id = $1 AND version_num = $2
|
||||
"#,
|
||||
)
|
||||
@@ -112,7 +112,7 @@ impl EntityVersioningService {
|
||||
changed_at,
|
||||
changed_by,
|
||||
COALESCE(fields_changed, '{}') as fields_changed
|
||||
FROM knowledge_node_version
|
||||
FROM memory_entity_version
|
||||
WHERE entity_id = $1 AND changed_at <= $2
|
||||
ORDER BY version_num DESC
|
||||
LIMIT 1
|
||||
@@ -146,7 +146,7 @@ impl EdgeVersioningService {
|
||||
changed_at,
|
||||
changed_by,
|
||||
COALESCE(fields_changed, '{}') as fields_changed
|
||||
FROM knowledge_edge_version
|
||||
FROM memory_edge_version
|
||||
WHERE edge_id = $1
|
||||
ORDER BY version_num DESC
|
||||
"#,
|
||||
@@ -172,7 +172,7 @@ impl EdgeVersioningService {
|
||||
changed_at,
|
||||
changed_by,
|
||||
COALESCE(fields_changed, '{}') as fields_changed
|
||||
FROM knowledge_edge_version
|
||||
FROM memory_edge_version
|
||||
WHERE edge_id = $1 AND version_num = $2
|
||||
"#,
|
||||
)
|
||||
@@ -190,7 +190,7 @@ impl EdgeVersioningService {
|
||||
changed_at,
|
||||
changed_by,
|
||||
COALESCE(fields_changed, '{}') as fields_changed
|
||||
FROM knowledge_edge_version
|
||||
FROM memory_edge_version
|
||||
WHERE edge_id = $1 AND version_num = $2
|
||||
"#,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user