applySchema
applySchema(
db,definables,method):Promise<void>
Defined in: schema/generator.ts:62
Generates and applies the full SurrealQL schema to a SurrealDB instance.
Parameters
Section titled “Parameters”Surreal
The SurrealDB instance to apply the schema to.
definables
Section titled “definables”Definable[]
An array of Definable entities (model classes and index definitions).
method
Section titled “method”The method to use for schema application if a table already exists.
"IF NOT EXISTS" | "OVERWRITE" | "error"
Returns
Section titled “Returns”Promise<void>