···1package db
23-import "database/sql"
000045type DB struct {
6 *sql.DB
···27 );
2829 create table if not exists pipelines (
30- rkey text not null,
31- pipeline text not null, -- json
32- primary key rkey
00000000033 );
34 `)
35 if err != nil {
···1package db
23+import (
4+ "database/sql"
5+6+ _ "github.com/mattn/go-sqlite3"
7+)
89type DB struct {
10 *sql.DB
···31 );
3233 create table if not exists pipelines (
34+ at_uri text not null,
35+ status text not null,
36+37+ -- only set if status is 'failed'
38+ error text,
39+ exit_code integer,
40+41+ started_at timestamp not null default (strftime('%Y-%m-%dT%H:%M:%SZ', 'now')),
42+ updated_at timestamp not null default (strftime('%Y-%m-%dT%H:%M:%SZ', 'now')),
43+ finished_at timestamp,
44+45+ primary key (at_uri)
46 );
47 `)
48 if err != nil {