Documentation
Schemy DSL syntax to model tables, relationships, and data types in a clear and practical way.
Start each entity with Table and define fields inside the block.
The most common signature combines the table name with a column block, and you can apply visual styling using [color: #6366f1].
Each column follows a declarative and predictable signature.
Use the name type [options] pattern to improve readability, validation, and SQL generation.
pk / primary keySets the column as a primary key.
incrementEnables auto-increment for numeric fields.
not nullPrevents null values in this column.
uniqueEnsures unique values across records.
nullableAllows null values in this column.
note: '...'Adds a semantic note to the column.
Connect tables with Ref using directional operators.
> means many-to-one and < means one-to-many.
Input mappings from DSL syntax to PostgreSQL output.
| DSL Input | PostgreSQL Output |
|---|---|
int, integer | integer |
bigint | bigint |
string, text | text |
bool, boolean | boolean |
float | real |
double | double precision |
decimal(p,s) | numeric(p,s) |
varchar(n) | varchar(n) |
uuid | uuid |
date | date |
timestamp, datetime | timestamp without time zone |
Fixed parsing and validation behavior.
Keywords are case-insensitive: Table, TABLE, and table all work.
Blank lines are ignored during parsing.
Syntax errors return the exact line number.
Primary keys can be defined with pk or [pk] after the type.
Relationships are declared using Ref between columns.
Table header color supports [color: value].
Options like [not null], [unique], and [increment] are supported.
Ready-to-paste schema for the editor.
Color changes on diagram nodes remain synchronized with the DSL.