infra/sql/0004_event_pipeline.sql
Metadata
- Purpose: SQL migration or seed data script for persistent storage.
- Domain:
infrastructure - Language:
sql - Bytes: 1275
- Lines: 39
- Content hash (short):
a52f6500 - Source (start): infra/sql/0004_event_pipeline.sql:1
- Source (end): infra/sql/0004_event_pipeline.sql:39
Indexed Symbols
No indexed functions/methods detected in this file.
Markdown Headings (if applicable)
No markdown headings detected.
Source Preview
-- Event pipeline durability tables for telemetry ingest and routed actions.
create table if not exists telemetry_ingest_batches (
id uuid primary key default gen_random_uuid(),
workspace_id uuid not null,
correlation_id uuid not null,
event_count integer not null,
received_at timestamptz not null default now(),
payload jsonb not null
);
create table if not exists outbox_events (
id uuid primary key default gen_random_uuid(),
workspace_id uuid not null,
topic text not null,
correlation_id uuid not null,
payload jsonb not null,
status text not null default 'pending',
attempts integer not null default 0,
available_at timestamptz not null default now(),
created_at timestamptz not null default now(),
updated_at timestamptz not null default now()
);
create index if not exists idx_outbox_events_status_available