Files
ai-exchange/migrations/039_create_research_council_checkpoints.sql
T
2026-05-11 23:37:47 +08:00

17 lines
621 B
SQL

create table if not exists research_council_checkpoints (
id bigserial primary key,
run_id bigint null,
instrument_id bigint not null,
checkpoint_key text not null,
status text not null,
stage text not null,
payload jsonb not null default '{}'::jsonb,
created_ts timestamptz not null,
updated_ts timestamptz not null,
created_at timestamptz not null default now(),
updated_at timestamptz not null default now()
);
create index if not exists idx_research_council_checkpoints_latest
on research_council_checkpoints (instrument_id, checkpoint_key, updated_ts desc, id desc);