Skip to content

Delete the dead SurrealDB DDL generator (SchemaTableManager) #1496

Closed

Description

@malibio

Overview

SchemaTableManager generates SurrealDB DDL (DEFINE TABLE ... SCHEMAFULL TYPE RELATION, time::now()) that the SQLite store cannot execute. The output is computed, threaded through the atomic-create API as _ddl_statements, and silently discarded.

Problem Statement

Roughly 300 lines of production code plus ~480 lines of tests (and a #[cfg(test)] re-implementation that will drift) exist to produce DDL for a database backend no longer used (replaced by SQLite/libsql; cloud is Supabase per ADR-036). It is pure dead weight and a drift hazard.

Proposed Solution

Delete the struct, its tests, the _ddl_statements params, the DDL branches in the callers, and any now-unused helpers (compute_edge_table_name/edge_table). Schema-node creation collapses to a plain create_node.

Acceptance Criteria

  • SchemaTableManager and its test file are removed
  • _ddl_statements parameters and DDL branches in callers are removed
  • Schema-node creation goes through the normal create path
  • Code passes bun run quality:fix; tests pass (bun run test:all)

Technical Specifications

Reference Files

  • packages/core/src/services/schema_table_manager.rs (generator + #[cfg(test)] re-impl)
  • packages/core/src/db/sqlite_store.rs (~715-740, consumed-then-discarded)
  • packages/core/src/services/node_service/crud.rs, node_service/mod.rs, relationship_cache.rs (callers)
  • packages/core/tests/schema_table_manager_test.rs
  • Context: ADR-036

Related Issues

  • (none)

Activity

  1. malibio commented on Jul 10, 2026

    @malibio
    CollaboratorAuthor

    Frontend: 3991 passed (156 test files)

  2. self-assigned this
    on Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions