afterHashtextoptionalThe hash of what was there after
Becomes the column after_hash of drill.
Written at commons/data/models/proof/mod.ts:61
One drill of a recovery: what was tested (a replay, a rollback or a restore), against which load or scope, how long it took, what it found and the evidence, so that a recovery is shown and not assumed
Model proof. Written in commons/data/models/proof/mod.ts:51. Identified by drillId.
afterHashtextoptionalThe hash of what was there after
Becomes the column after_hash of drill.
Written at commons/data/models/proof/mod.ts:61
beforeHashtextoptionalThe hash of what was there before
Becomes the column before_hash of drill.
Written at commons/data/models/proof/mod.ts:60
drillIdidentifierrequiredWhat identifies the drill
Becomes the column drill_id of drill.
Written at commons/data/models/proof/mod.ts:54
evidencetextoptionalWhere the evidence is kept
Becomes the column evidence of drill.
Written at commons/data/models/proof/mod.ts:62
kindcode of drillKindrequiredoutcomecode of drillOutcomerequiredscopetextrequiredWhat it was done to: a load id, a table or a store
Becomes the column scope of drill.
Written at commons/data/models/proof/mod.ts:56
secondsintegerrequiredHow long it took, in whole seconds
Becomes the column seconds of drill.
Written at commons/data/models/proof/mod.ts:58
startedAtinstantrequiredProjects to the table drill with the primary key drill_id.
| Column | Type | Null | Role | From |
|---|---|---|---|---|
after_hash | text | true | attribute | drill.afterHash |
before_hash | text | true | attribute | drill.beforeHash |
drill_id | text | false | attribute | drill.drillId |
evidence | text | true | attribute | drill.evidence |
kind | text | false | attribute | drill.kind |
outcome | text | false | attribute | drill.outcome |
scope | text | false | attribute | drill.scope |
seconds | integer | false | attribute | drill.seconds |
started_at | timestamp | false | attribute | drill.startedAt |
CREATE TABLE IF NOT EXISTS "drill" (
"drill_id" VARCHAR NOT NULL PRIMARY KEY,
"kind" VARCHAR NOT NULL,
"scope" VARCHAR NOT NULL,
"started_at" TIMESTAMPTZ NOT NULL,
"seconds" INTEGER NOT NULL,
"outcome" VARCHAR NOT NULL,
"before_hash" VARCHAR,
"after_hash" VARCHAR,
"evidence" VARCHAR,
CONSTRAINT "drill_kind_ck" CHECK ("kind" IN ('replay', 'rollback', 'restore')),
CONSTRAINT "drill_outcome_ck" CHECK ("outcome" IN ('passed', 'failed', 'abandoned'))
);CREATE TABLE IF NOT EXISTS "drill" (
"drill_id" TEXT NOT NULL PRIMARY KEY,
"kind" TEXT NOT NULL,
"scope" TEXT NOT NULL,
"started_at" TIMESTAMPTZ NOT NULL,
"seconds" INTEGER NOT NULL,
"outcome" TEXT NOT NULL,
"before_hash" TEXT,
"after_hash" TEXT,
"evidence" TEXT,
CONSTRAINT "drill_kind_ck" CHECK ("kind" IN ('replay', 'rollback', 'restore')),
CONSTRAINT "drill_outcome_ck" CHECK ("outcome" IN ('passed', 'failed', 'abandoned'))
);CREATE TABLE IF NOT EXISTS "drill" (
"drill_id" TEXT NOT NULL PRIMARY KEY,
"kind" TEXT NOT NULL,
"scope" TEXT NOT NULL,
"started_at" TEXT NOT NULL,
"seconds" INTEGER NOT NULL,
"outcome" TEXT NOT NULL,
"before_hash" TEXT,
"after_hash" TEXT,
"evidence" TEXT,
CONSTRAINT "drill_kind_ck" CHECK ("kind" IN ('replay', 'rollback', 'restore')),
CONSTRAINT "drill_outcome_ck" CHECK ("outcome" IN ('passed', 'failed', 'abandoned'))
);Read and written from TypeScript with the types the model gives: import { drill } from "@intellectual-frontiers/data/sql/typed/models". Generated in commons/data/sql/typed/models/proof.auto.ts: do not edit.
import { from } from "@intellectual-frontiers/data/sql/typed";
import { drill } from "@intellectual-frontiers/data/sql/typed/models";
const rows = await from(drill).select((s) => ({ drillId: s.drill.drillId, kind: s.drill.kind })).run(runner);