Skip to content

applySchema

applySchema(db, definables, method): Promise<void>

Defined in: schema/generator.ts:76

Generates and applies the full SurrealQL schema to a SurrealDB instance.

Surreal

The SurrealDB instance to apply the schema to.

Definable[]

An array of Definable entities (model classes and index definitions).

SchemaApplicationMethod = "error"

The method to use for schema application if a table already exists.

Promise<void>