···3030 did text primary key
3131 );
32323333- create table if not exists pipeline_status (
3333+ -- status event for a single workflow
3434+ create table if not exists events (
3435 rkey text not null,
3535- pipeline text not null,
3636- status text not null,
3737-3838- -- only set if status is 'failed'
3939- error text,
4040- exit_code integer,
4141-4242- started_at timestamp not null default (strftime('%Y-%m-%dT%H:%M:%SZ', 'now')),
4343- updated_at timestamp not null default (strftime('%Y-%m-%dT%H:%M:%SZ', 'now')),
4444- finished_at timestamp,
4545-4646- primary key (rkey)
3636+ nsid text not null,
3737+ event text not null, -- json
3838+ created integer not null -- unix nanos
4739 );
4840 `)
4941 if err != nil {