decidedAtinstantoptionalWhen it was decided
Becomes the column decided_at of variance.
Written at commons/data/models/meaning/mod.ts:101
A known difference between a source and the canonical form, with who decided to live with it and when that ends: a variance is accepted for a time and then expires
Model meaning. Written in commons/data/models/meaning/mod.ts:92. Identified by varianceId.
decidedAtinstantoptionalWhen it was decided
Becomes the column decided_at of variance.
Written at commons/data/models/meaning/mod.ts:101
decidedBytextoptionalWho decided to accept it
Becomes the column decided_by of variance.
Written at commons/data/models/meaning/mod.ts:100
descriptiontextrequiredWhat differs, in a sentence
Becomes the column description of variance.
Written at commons/data/models/meaning/mod.ts:97
expiresAtinstantoptionalWhen the acceptance ends
Becomes the column expires_at of variance.
Written at commons/data/models/meaning/mod.ts:102
ownertextrequiredWho answers for it
Becomes the column owner of variance.
Written at commons/data/models/meaning/mod.ts:99
statuscode of varianceStatusrequiredsubjecttextrequiredThe source and field it is about
Becomes the column subject of variance.
Written at commons/data/models/meaning/mod.ts:96
varianceIdidentifierrequiredWhat identifies the variance
Becomes the column variance_id of variance.
Written at commons/data/models/meaning/mod.ts:95
Projects to the table variance with the primary key variance_id.
| Column | Type | Null | Role | From |
|---|---|---|---|---|
decided_at | timestamp | true | attribute | variance.decidedAt |
decided_by | text | true | attribute | variance.decidedBy |
description | text | false | attribute | variance.description |
expires_at | timestamp | true | attribute | variance.expiresAt |
owner | text | false | attribute | variance.owner |
status | text | false | attribute | variance.status |
subject | text | false | attribute | variance.subject |
variance_id | text | false | attribute | variance.varianceId |
CREATE TABLE IF NOT EXISTS "variance" (
"variance_id" VARCHAR NOT NULL PRIMARY KEY,
"subject" VARCHAR NOT NULL,
"description" VARCHAR NOT NULL,
"status" VARCHAR NOT NULL,
"owner" VARCHAR NOT NULL,
"decided_by" VARCHAR,
"decided_at" TIMESTAMPTZ,
"expires_at" TIMESTAMPTZ,
CONSTRAINT "variance_status_ck" CHECK ("status" IN ('open', 'accepted', 'resolved', 'expired'))
);CREATE TABLE IF NOT EXISTS "variance" (
"variance_id" TEXT NOT NULL PRIMARY KEY,
"subject" TEXT NOT NULL,
"description" TEXT NOT NULL,
"status" TEXT NOT NULL,
"owner" TEXT NOT NULL,
"decided_by" TEXT,
"decided_at" TIMESTAMPTZ,
"expires_at" TIMESTAMPTZ,
CONSTRAINT "variance_status_ck" CHECK ("status" IN ('open', 'accepted', 'resolved', 'expired'))
);CREATE TABLE IF NOT EXISTS "variance" (
"variance_id" TEXT NOT NULL PRIMARY KEY,
"subject" TEXT NOT NULL,
"description" TEXT NOT NULL,
"status" TEXT NOT NULL,
"owner" TEXT NOT NULL,
"decided_by" TEXT,
"decided_at" TEXT,
"expires_at" TEXT,
CONSTRAINT "variance_status_ck" CHECK ("status" IN ('open', 'accepted', 'resolved', 'expired'))
);Read and written from TypeScript with the types the model gives: import { variance } from "@intellectual-frontiers/data/sql/typed/models". Generated in commons/data/sql/typed/models/meaning.auto.ts: do not edit.
import { from } from "@intellectual-frontiers/data/sql/typed";
import { variance } from "@intellectual-frontiers/data/sql/typed/models";
const rows = await from(variance).select((s) => ({ varianceId: s.variance.varianceId, subject: s.variance.subject })).run(runner);