Skip to main content

RelationalSchemaOptions

@webda/sql-schema


Interface: RelationalSchemaOptions

Defined in: packages/sql-schema/src/builder.ts:27

Options of RelationalSchemaBuilder

Extends​

Properties​

columnNaming?​

optional columnNaming?: "preserve" | "snake_case"

Defined in: packages/sql-schema/src/plan.ts:269

preserve keeps the field names (quoted camelCase), snake_case converts them

Inherited from​

SchemaLayoutOptions.columnNaming


extraColumn?​

optional extraColumn?: string | false

Defined in: packages/sql-schema/src/plan.ts:273

Name of the JSON column keeping unknown properties, false to have none

Inherited from​

SchemaLayoutOptions.extraColumn


foreignKeys?​

optional foreignKeys?: boolean

Defined in: packages/sql-schema/src/plan.ts:277

Create foreign key constraints between the tables of the plan

Inherited from​

SchemaLayoutOptions.foreignKeys


knownModels?​

optional knownModels?: Iterable<SchemaModelMetadata, any, any>

Defined in: packages/sql-schema/src/builder.ts:36

Models outside the plan, to resolve and type the references to them (no foreign key is created to them)


numericAsDecimal?​

optional numericAsDecimal?: boolean

Defined in: packages/sql-schema/src/plan.ts:281

Map JSON schema number to decimal instead of double

Inherited from​

SchemaLayoutOptions.numericAsDecimal


referencedTables?​

optional referencedTables?: object

Defined in: packages/sql-schema/src/builder.ts:41

Tables outside the plan a reference may point to with a foreign key (foreignKeysToJsonb): the key column(s) of the table holding a model of another store in the same database, by model identifier

Index Signature​

[identifier: string]: ReferencedTable


tables?​

optional tables?: object

Defined in: packages/sql-schema/src/builder.ts:32

Table name per model identifier. A subclass with its own entry gets its own table; the others share the table of their closest planned ancestor. Default name: the identifier lowercased, / replaced by _ (as SQLStore)

Index Signature​

[identifier: string]: string