Minimal
The smallest useful diagram: two tables and one relationship.
Covers: Two tables, pk, increment, not null, unique, expression default, one inline ref
2 tables · 1 ref
01-minimal.dbml
Source
examples/01-minimal.dbml
examples/01-minimal.dbml
// The smallest useful diagram: two tables and one relationship.
Table users {
id integer [pk, increment]
email varchar(255) [not null, unique]
created_at timestamp [default: `now()`]
}
Table posts {
id integer [pk, increment]
user_id integer [not null, ref: > users.id]
title varchar(200) [not null]
body text
}