Schemy is a web-based IDE for modeling database schemas using a clean, declarative DSL. Write your tables and relationships as code and watch a live entity-relationship diagram render instantly on the side — no drag-and-drop, no clunky UI, just schema design the way developers like it.
When you're done, export clean SQL ready for PostgreSQL, SQLite, Oracle, SQL Server, and more.
- Schema as Code — Model your database using a simple, readable DSL
- Live Diagram Preview — Entity-relationship diagram updates in real time as you type
- SQL Export — Generate clean, production-ready SQL for multiple databases
- Universal Compatibility — PostgreSQL, Oracle, SQL Server, SQLite and more
- Zero Lock-in — Free and open to the engineering community
- Fast & Lightweight — Engineered for speed; start modeling instantly with no setup
Head over to schemy.app and click Get Started — no credit card required.
Table users {
id uuid [pk]
email varchar [unique, not null]
name varchar
createdAt timestamp
}
Table posts {
id uuid [pk]
title varchar [not null]
body text
author_id uuid [ref: > users.id]
}As you type, the diagram renders automatically — and you can export the SQL at any time.
Define entities with the Table keyword followed by a column block. You can customize node colors on the diagram using [color: #6366f1].
Table orders [color: #f97316] {
id uuid [pk]
total decimal(10,2)
}Follow the name type [options] pattern:
| Option | Description |
|---|---|
pk / [pk] |
Sets the column as a primary key |
increment |
Enables auto-increment for numeric fields |
not null |
Prevents null values |
unique |
Ensures unique values across all records |
nullable |
Explicitly allows null values |
note: '...' |
Adds a semantic annotation to the column |
Connect tables using Ref with directional operators:
author_id uuid [ref: > users.id] // many-to-one (N→1)
post_id uuid [ref: < posts.id] // one-to-many (1→N)| 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 |
- Keywords are case-insensitive:
Table,TABLE, andtableall work - Blank lines are ignored during parsing
- Syntax errors return the exact line number
- Primary keys can be defined with
pkor[pk]after the type - Relationships are declared using
Refbetween columns - Table header color supports
[color: value] - Options like
[not null],[unique], and[increment]are supported
Table users [color: #6366f1] {
id uuid [pk]
email varchar [unique, not null]
name varchar
created_at timestamp [not null]
}
Table posts [color: #f97316] {
id uuid [pk]
title varchar [not null]
body text
author_id uuid [ref: > users.id]
created_at timestamp
}
Table comments {
id uuid [pk]
content text [not null]
post_id uuid [ref: > posts.id]
user_id uuid [ref: > users.id]
created_at timestamp
}Schemy exports clean SQL compatible with:
- PostgreSQL
- SQLite
- Oracle
- SQL Server
Just model your schema and click Export — the output is ready for your database layer with no modifications needed.
Full DSL reference available at schemy.app/docs.
Have questions or feedback?
- Email: contact@schemy.app
- Changelog: schemy.app/changelog

