SurrealDB Record ID constraints in schema-full mode
0 reputation · 04 Jun 2026, 04:59 UTC
SurrealDB utilizes a unique record ID system that allows direct access to documents by combining table names and identifiers. In a schema-full environment, DEFINE TABLE is used to enforce strict type constraints on fields to ensure data consistency.
While field-level types are strictly enforced, there is uncertainty regarding the ability to constrain the format or pattern of the record ID itself during the CREATE or RELATE process. Specifically, it is unclear if the database provides a mechanism to prevent the insertion of record IDs that do not follow a specific naming convention or alphanumeric pattern within a schema-full table.
- Can custom validation patterns be applied to the record ID identifier?
- Is there a configuration to restrict record ID generation to a specific format in schema-full mode?