refactor: rename memory_entity→knowledge_node, knowledge graph edge→knowledge_edge
CI / CI (pull_request) Failing after 11m15s
CI / CI (pull_request) Failing after 11m15s
Resolves table name collision between: - memory_edge (provenance DAG: child_sha/parent_sha) — KEPT - knowledge_edge (knowledge graph: source_id/target_id) — NEW NAME Changes: - memory_entity → knowledge_node (all .rs + migrations 003-009) - knowledge graph memory_edge → knowledge_edge - memory_entity_version → knowledge_node_version - memory_edge_version → knowledge_edge_version - Added knowledge_node + knowledge_edge to init_schema() - Converted versioning.rs from sqlx::query_as! to runtime queries (avoids stale sqlx offline cache dependency) - Fixed UUID cast: $1::UUID for String→UUID column binds - Fixed column names: source_entity_id→source_id, target_entity_id→target_id Production DB: knowledge_node + knowledge_edge tables created, memory_entity VIEW points to knowledge_node for backward compat.
This commit is contained in:
@@ -51,8 +51,8 @@ pub struct Edge {
|
||||
pub project_id: String,
|
||||
|
||||
// Relationship
|
||||
pub source_entity_id: String, // FK to memory_entity
|
||||
pub target_entity_id: String, // FK to memory_entity
|
||||
pub source_entity_id: String, // FK to knowledge_node
|
||||
pub target_entity_id: String, // FK to knowledge_node
|
||||
pub relation_type: String,
|
||||
pub fact: String,
|
||||
pub fact_embedding: Option<Vec<f32>>,
|
||||
@@ -71,7 +71,7 @@ pub struct Edge {
|
||||
|
||||
// Provenance
|
||||
pub source_episode_id: Option<i64>, // FK to memory_node
|
||||
pub invalidated_by: Option<String>, // FK to memory_edge.id
|
||||
pub invalidated_by: Option<String>, // FK to knowledge_edge.id
|
||||
|
||||
// Contradiction handling
|
||||
pub contradiction_status: ContradictionStatus,
|
||||
|
||||
Reference in New Issue
Block a user