groups

Named associations (ADR-021)

What you'll learn

You're writing SQL that reads groups and need its columns, what each holds, and the DDL as the spec states it.

  • every column and its type
  • what the object holds and who writes it
  • the DDL as the spec states it

A table. Named associations (ADR-021); entity_type is the members' type (ADR-054); character derived from events.

Columns

ColumnTypeConstraints
idTEXTPRIMARY KEY
nameTEXTNOT NULL UNIQUE
noteTEXT
created_atTEXTNOT NULL
entity_typeTEXT

Definition

From spec/ledger.sql, which is the machine-checkable form of SPEC.md §3:

CREATE TABLE groups (
  id          TEXT PRIMARY KEY,          -- ULID
  name        TEXT NOT NULL UNIQUE,
  note        TEXT,
  created_at  TEXT NOT NULL,
  entity_type TEXT                       -- ADR-054: the members' type; null = created before it (entity-blind)
);