revert: restore memory_entity/memory_edge table names
CI / CI (pull_request) Canceled after 8m27s

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:
2026-09-15 17:29:53 +09:00
parent 181b0e0f99
commit fd59c6de11
26 changed files with 175 additions and 163 deletions
+4 -4
View File
@@ -108,7 +108,7 @@ impl FacetedSearch {
// Get entity types
let entity_types = sqlx::query_as::<_, (String, i64)>(
"SELECT entity_type, COUNT(*) as cnt
FROM knowledge_node
FROM memory_entity
WHERE deleted_at IS NULL
GROUP BY entity_type
ORDER BY cnt DESC
@@ -128,7 +128,7 @@ impl FacetedSearch {
// Get total count
let total_count: (i64,) = sqlx::query_as(
"SELECT COUNT(*) FROM knowledge_node WHERE deleted_at IS NULL"
"SELECT COUNT(*) FROM memory_entity WHERE deleted_at IS NULL"
)
.fetch_one(&self.pool)
.await
@@ -212,7 +212,7 @@ impl FacetedSearch {
// Get relation types
let relation_types = sqlx::query_as::<_, (String, i64)>(
"SELECT relation_type, COUNT(*) as cnt
FROM knowledge_edge
FROM memory_edge
WHERE fact_invalid_at IS NULL AND deleted_at IS NULL
GROUP BY relation_type
ORDER BY cnt DESC
@@ -232,7 +232,7 @@ impl FacetedSearch {
// Get total count
let total_count: (i64,) = sqlx::query_as(
"SELECT COUNT(*) FROM knowledge_edge WHERE fact_invalid_at IS NULL AND deleted_at IS NULL"
"SELECT COUNT(*) FROM memory_edge WHERE fact_invalid_at IS NULL AND deleted_at IS NULL"
)
.fetch_one(&self.pool)
.await