Implement 6-char progressive hash IDs (bd-166, bd-167)
- Hash ID generation now returns full 64-char SHA256 - Progressive collision handling: 6→7→8 chars on INSERT failure - Added child_counters table for hierarchical IDs - Updated all docs to reflect 6-char design - Collision math: 97% of 1K issues stay at 6 chars Next: Implement progressive retry logic in CreateIssue (bd-168) Amp-Thread-ID: https://ampcode.com/threads/T-9931c1b7-c989-47a1-8e6a-a04469bd937d Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
@@ -135,6 +135,14 @@ CREATE TABLE IF NOT EXISTS issue_counters (
|
||||
last_id INTEGER NOT NULL DEFAULT 0
|
||||
);
|
||||
|
||||
-- Child counters table (for hierarchical ID generation)
|
||||
-- Tracks sequential child numbers per parent issue
|
||||
CREATE TABLE IF NOT EXISTS child_counters (
|
||||
parent_id TEXT PRIMARY KEY,
|
||||
last_child INTEGER NOT NULL DEFAULT 0,
|
||||
FOREIGN KEY (parent_id) REFERENCES issues(id) ON DELETE CASCADE
|
||||
);
|
||||
|
||||
-- Issue snapshots table (for compaction)
|
||||
CREATE TABLE IF NOT EXISTS issue_snapshots (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
|
||||
Reference in New Issue
Block a user