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:
@@ -274,9 +274,9 @@ pub static WRITE_BYTES_TOTAL: Counter = Counter::new(
|
||||
"memory_write_bytes_total", "Total bytes written to storage");
|
||||
|
||||
pub static DB_ENTITY_COUNT: Gauge = Gauge::new(
|
||||
"memory_db_entity_count", "Current entity count in memory_entity table");
|
||||
"memory_db_entity_count", "Current entity count in knowledge_node table");
|
||||
pub static DB_EDGE_COUNT: Gauge = Gauge::new(
|
||||
"memory_db_edge_count", "Current edge count in memory_edge table");
|
||||
"memory_db_edge_count", "Current edge count in knowledge_edge table");
|
||||
pub static DB_CHUNK_COUNT: Gauge = Gauge::new(
|
||||
"memory_db_chunk_count", "Current chunk count in memory_chunks table");
|
||||
|
||||
@@ -436,9 +436,9 @@ pub static DB_TRANSACTION_DURATION: Lazy<Histogram> = Lazy::new(||
|
||||
|
||||
// Table-specific row counts (updated periodically)
|
||||
pub static DB_TABLE_ENTITY_ROWS: Gauge = Gauge::new(
|
||||
"memory_db_table_entity_rows", "Rows in memory_entity table");
|
||||
"memory_db_table_entity_rows", "Rows in knowledge_node table");
|
||||
pub static DB_TABLE_EDGE_ROWS: Gauge = Gauge::new(
|
||||
"memory_db_table_edge_rows", "Rows in memory_edge table");
|
||||
"memory_db_table_edge_rows", "Rows in knowledge_edge table");
|
||||
pub static DB_TABLE_CHUNK_ROWS: Gauge = Gauge::new(
|
||||
"memory_db_table_chunk_rows", "Rows in memory_chunks table");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user