Skip to main content

RelationalSchemaOptions

@webda/sql-schema


Interface: RelationalSchemaOptions

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

Options of RelationalSchemaBuilder

Extends​

Properties​

columnNaming?​

optional columnNaming?: "preserve" | "snake_case"

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

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:210

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:214

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:30

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:218

Map JSON schema number to decimal instead of double

Inherited from​

SchemaLayoutOptions.numericAsDecimal


tables?​

optional tables?: object

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

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