id;s are u64 #3
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
as id's use autocincrement u64 everywhere not long guids
make sure the _server,_ui, _web (if it exists), the openrpc, the sdk all gets changed to use incremental id's for everything
Implementation Spec for Issue #3: IDs are u64
Objective
Replace all string-based UUID/GUID primary keys with autoincrement
u64(INTEGER PRIMARY KEY AUTOINCREMENTin SQLite) across the entire stack: database schema, server models, server handlers, OpenRPC spec, SDK client, admin UI, and end-user web UI.Requirements
INTEGER PRIMARY KEY AUTOINCREMENTinstead ofTEXT PRIMARY KEYTEXTtoINTEGERuuidcrateintegertypes for all ID fieldsu64for ID parametersboard_sharestable gets integer PK +token TEXT UNIQUEcolumnImplementation Plan (10 Steps)
INTEGER PRIMARY KEY AUTOINCREMENTid: Stringtoid: u64in model structslast_insert_rowid(), change param typesas_str()withas_u64(), remove UUID generation"type": "string"to"type": "integer"&strtou64Path<String>toPath<u64>for board routesAcceptance Criteria
INTEGER PRIMARY KEY AUTOINCREMENTINTEGERtypeuuidcrate removed"type": "integer"as_u64()u64for ID params/board/42)Notes
DEFAULT_WORKSPACE_IDchanges from"default"to1u64board_sharesgets integer PK + separatetokencolumnBuild & Test Results
cargo build --workspace: ✅ Passedcargo test --workspace: ✅ Passed (all tests pass)Issues Found & Fixed During Build
crates/hero_whiteboard_examples/examples/basic_usage.rs— was still usingas_str()for ID extraction; updated toas_u64()to match the new u64 ID typesChanges Summary
All ID fields across the stack have been migrated from String/UUID to u64 autoincrement:
id: String→id: u64Implementation committed:
a232f127ddf024e962e3e2d4203dc9d8a3a65808Browse:
a232f127dd