RelationalLayoutParameters
Interface: RelationalLayoutParameters
Defined in: packages/sql/src/relational/support.ts:31
Parameters every relational store exposes on top of its engine parameters
Properties
allowIncompatible?
optionalallowIncompatible?:string[]
Defined in: packages/sql/src/relational/support.ts:87
Elements whose blocking changes against a live version are accepted (<table>, <table>.<column>, <model>
or <model>.<attribute>): the BLOCK becomes a WARN and the version records it in forced
Default
[]
appVersion?
optionalappVersion?:string
Defined in: packages/sql/src/relational/support.ts:81
Version of the application recorded in the Webda/SchemaVersion registry
Default
the version of package.json
columnNaming?
optionalcolumnNaming?:"preserve"|"snake_case"
Defined in: packages/sql/src/relational/support.ts:47
preserve keeps the field names as column names (quoted camelCase), snake_case converts them
Default
"preserve"
extraColumn?
optionalextraColumn?:string|false
Defined in: packages/sql/src/relational/support.ts:52
JSON column keeping the properties the model schema does not declare, false to refuse them
Default
"_extra"
foreignKeys?
optionalforeignKeys?:boolean
Defined in: packages/sql/src/relational/support.ts:57
Create foreign key constraints between the tables of the store
Default
true
foreignKeysToJsonb?
optionalforeignKeysToJsonb?:boolean
Defined in: packages/sql/src/relational/support.ts:63
Also create a foreign key to the key column of the JSON table of a model served by a JSON store of the same
engine (the Registry) on the same database with a table per model; the JSON table is created with the schema
Default
false
numericAsDecimal?
optionalnumericAsDecimal?:boolean
Defined in: packages/sql/src/relational/support.ts:68
Store JSON number fields as decimals instead of doubles
Default
false
schemaSync?
optionalschemaSync?:SchemaSyncMode
Defined in: packages/sql/src/relational/support.ts:42
What init() does with the database schema
none: nothingcreate: create the missing tables, with their indexes and foreign keysalter:create, plus add the missing columns, indexes and foreign keys of the existing tables (never drops, narrows or setsNOT NULL)validate: write nothing, fail when anything is missing or differs
Default
"create"
table?
optionaltable?:string
Defined in: packages/sql/src/relational/support.ts:76
One shared table (the JSON stores): refused by a relational store
tables?
optionaltables?:object
Defined in: packages/sql/src/relational/support.ts:72
Per-model table name overrides: lowercase identifiers
Index Signature
[modelIdentifier: string]: string
versionHeartbeat?
optionalversionHeartbeat?:number
Defined in: packages/sql/src/relational/support.ts:92
Seconds between two heartbeats of the version in the registry, 0 for none
Default
60
versionTtl?
optionalversionTtl?:number
Defined in: packages/sql/src/relational/support.ts:97
Seconds after its last heartbeat a version still counts as live
Default
600