Skip to main content

Function: sourceDerivationSchema()

sourceDerivationSchema(prefix?): readonly string[]

Defined in: packages/agentos/src/cognition/library/sourceDerivationSchema.ts:36

PostgreSQL DDL for migration-owned durable provenance and content-free fences.

Each statement creates its table or index only when it is missing. The store never runs them: the application's migration does, before a store with the same prefix is used. The results and edges tables hold restricted content (a result's payload and its dependencies); the owners, journal and tombstones tables hold only opaque keys, counters and flags, and none of them references an account table, so removing an account cannot erase its deletion records.

Parameters​

prefix?​

string = 'agentos_source_derivation'

Table-name prefix: a lower-case letter, then at most 39 lower-case letters, digits or underscores.

Returns​

readonly string[]

The statements, in the order they must run.

Throws​

invalid_derivation_table_prefix when the prefix does not have that form.