Skip to main content

infra/sql/0005_job_queue.sql

Metadata

Indexed Symbols

No indexed functions/methods detected in this file.

Markdown Headings (if applicable)

No markdown headings detected.

Source Preview

create table if not exists background_jobs (
id uuid primary key default gen_random_uuid(),
workspace_id uuid not null,
job_type text not null,
status text not null default 'queued',
payload jsonb not null,
created_at timestamptz not null default now(),
updated_at timestamptz not null default now()
);

create index if not exists idx_background_jobs_workspace_created
on background_jobs(workspace_id, created_at desc);