Initial commit: AS4/411 directory and discovery service for Sankofa Marketplace
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
16
packages/storage/migrations/002_routing_artifacts.sql
Normal file
16
packages/storage/migrations/002_routing_artifacts.sql
Normal file
@@ -0,0 +1,16 @@
|
||||
-- Routing artifacts: BIN tables, GTT tables, participant maps, fallback rules.
|
||||
-- See docs/architecture/data-model and protocol_registry.
|
||||
|
||||
CREATE TABLE IF NOT EXISTS routing_artifacts (
|
||||
id TEXT PRIMARY KEY,
|
||||
tenant_id TEXT REFERENCES tenants(id) ON DELETE CASCADE,
|
||||
artifact_type TEXT NOT NULL CHECK (artifact_type IN ('bin_table', 'gtt_table', 'participant_map', 'fallback_rules')),
|
||||
artifact_payload JSONB NOT NULL,
|
||||
effective_from TIMESTAMPTZ NOT NULL,
|
||||
effective_to TIMESTAMPTZ,
|
||||
signature TEXT,
|
||||
fingerprint TEXT
|
||||
);
|
||||
|
||||
CREATE INDEX idx_routing_artifacts_tenant_type ON routing_artifacts(tenant_id, artifact_type);
|
||||
CREATE INDEX idx_routing_artifacts_effective ON routing_artifacts(effective_from, effective_to);
|
||||
Reference in New Issue
Block a user