Aureline
Schema

Tables

Table declarations, modifiers, naming, and emitted SurrealQL.

Define a table with table, a name, an optional modifier, and a body.

table UserProfile schemafull {
  displayName string
}

Table names are emitted in snake case:

DEFINE TABLE user_profile SCHEMAFULL;
DEFINE FIELD display_name ON user_profile TYPE string;

Modifiers

ModifierOutput
noneDEFINE TABLE name;
schemafullDEFINE TABLE name SCHEMAFULL;
schemalessDEFINE TABLE name SCHEMALESS;
dropDEFINE TABLE name DROP;

Table body

A table body can contain fields and table-level index blocks such as @@index, @@unique, and @@count.

table Account schemafull {
  email string
  org record<Org>

  @@unique([org, email], name: org_email_unique)
}

Table views, relation declarations, events, and custom raw SurrealQL blocks are not first-class migration declarations yet.

On this page