Skip to content
🚀 This documentation is for unreal-orm 1.0.0 alpha which requires SurrealDB 2.0 SDK. For use with version 1.x, see here.

SchemaApplicationMethod

SchemaApplicationMethod = "IF NOT EXISTS" | "OVERWRITE" | "error"

Defined in: schema/ast/generator.ts:23

Specifies the method for applying a schema definition when an entity already exists.

  • IF NOT EXISTS: The DEFINE statement will only be executed if the entity does not already exist.
  • OVERWRITE: The existing entity will be overwritten with the new definition. Warning: This is a destructive operation.
  • error: (Default) An error will be thrown if the entity already exists.