Skip to content

Commit 919d19f

Browse files
steveyeggeclaude
andcommitted
Add rig_links table to commons schema (v1.2)
New table for cross-rig identity assertions. Enables linking multiple rigs owned by the same person (e.g., personal + work rigs) with bidirectional signed assertions. Link types: same_owner, delegate, team_member. Lifecycle: pending -> active -> revoked. Schema version bumped from 1.1 to 1.2 (minor, backwards-compatible). Existing forks auto-apply via CREATE TABLE IF NOT EXISTS on sync. Design doc: hop/docs/wasteland/rig-links.md Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 09f0939 commit 919d19f

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

schema/commons.sql

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ CREATE TABLE IF NOT EXISTS _meta (
33
value TEXT
44
);
55

6-
INSERT IGNORE INTO _meta (`key`, value) VALUES ('schema_version', '1.1');
6+
INSERT IGNORE INTO _meta (`key`, value) VALUES ('schema_version', '1.2');
77

88
CREATE TABLE IF NOT EXISTS rigs (
99
handle VARCHAR(255) PRIMARY KEY,
@@ -97,3 +97,19 @@ CREATE TABLE IF NOT EXISTS chain_meta (
9797
dolt_database VARCHAR(255),
9898
created_at TIMESTAMP
9999
);
100+
101+
CREATE TABLE IF NOT EXISTS rig_links (
102+
id VARCHAR(64) PRIMARY KEY,
103+
rig_a VARCHAR(255) NOT NULL,
104+
rig_b VARCHAR(255) NOT NULL,
105+
link_type VARCHAR(32) DEFAULT 'same_owner',
106+
assertion_a TEXT,
107+
assertion_b TEXT,
108+
status VARCHAR(32) DEFAULT 'pending',
109+
created_at TIMESTAMP,
110+
completed_at TIMESTAMP,
111+
revoked_at TIMESTAMP,
112+
revoked_by VARCHAR(255),
113+
UNIQUE KEY uq_rig_pair (rig_a, rig_b),
114+
CHECK (rig_a != rig_b)
115+
);

0 commit comments

Comments
 (0)