···11package db
2233-import "database/sql"
33+import (
44+ "database/sql"
55+66+ _ "github.com/mattn/go-sqlite3"
77+)
4859type DB struct {
610 *sql.DB
···2731 );
28322933 create table if not exists pipelines (
3030- rkey text not null,
3131- pipeline text not null, -- json
3232- primary key rkey
3434+ at_uri text not null,
3535+ status text not null,
3636+3737+ -- only set if status is 'failed'
3838+ error text,
3939+ exit_code integer,
4040+4141+ started_at timestamp not null default (strftime('%Y-%m-%dT%H:%M:%SZ', 'now')),
4242+ updated_at timestamp not null default (strftime('%Y-%m-%dT%H:%M:%SZ', 'now')),
4343+ finished_at timestamp,
4444+4545+ primary key (at_uri)
3346 );
3447 `)
3548 if err != nil {