Commit f07b42e
committed
fix: remove string id field definitions, use SurrealDB built-in record ids
BREAKING SCHEMA CHANGE: Fixed incompatibility with SurrealDB 2.3.10 record
ID handling by removing manual id field definitions.
Root cause: Defining `id` as `string` type overrides SurrealDB's built-in
record ID system, preventing proper record queries with FROM/WHERE clauses.
Changes:
- Removed `id` field definition from nodes table (line 35)
- Removed `id` field definition from edges table (line 99)
- Removed `id` field definition from symbol_embeddings table (line 216)
- Changed fn::node_info() parameter type from `string` to `record`
- Simplified fn::node_info() to use record parameter directly
In SurrealDB 2.x, `id` is ALWAYS a built-in record type (e.g., nodes:⟨uuid⟩).
Defining it as string breaks native record ID functionality.
Migration required:
1. Re-apply schema: cd schema && ./apply-schema.sh
2. Re-index codebase: codegraph index -l rust -r --force .
After migration, queries work properly:
SELECT * FROM nodes:⟨uuid⟩;
SELECT fn::node_info(nodes:⟨uuid⟩);1 parent 87f6f1d commit f07b42e
1 file changed
+5
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
| 34 | + | |
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
| |||
97 | 96 | | |
98 | 97 | | |
99 | 98 | | |
100 | | - | |
| 99 | + | |
101 | 100 | | |
102 | 101 | | |
103 | 102 | | |
| |||
214 | 213 | | |
215 | 214 | | |
216 | 215 | | |
217 | | - | |
| 216 | + | |
218 | 217 | | |
219 | 218 | | |
220 | 219 | | |
| |||
293 | 292 | | |
294 | 293 | | |
295 | 294 | | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
| 295 | + | |
305 | 296 | | |
306 | 297 | | |
307 | 298 | | |
| |||
314 | 305 | | |
315 | 306 | | |
316 | 307 | | |
317 | | - | |
| 308 | + | |
318 | 309 | | |
319 | 310 | | |
320 | 311 | | |
| |||
0 commit comments