Blog Schema (DBML)
Authors, posts, tags, and comments for a blog.
Make it your own.
Table authors {
id uuid [pk]
name varchar
email varchar [unique]
}
Table posts {
id uuid [pk]
author_id uuid [ref: > authors.id]
title varchar
slug varchar [unique]
published_at timestamp
}
Table tags {
id uuid [pk]
name varchar [unique]
}
Table post_tags {
post_id uuid [ref: > posts.id]
tag_id uuid [ref: > tags.id]
}
Table comments {
id uuid [pk]
post_id uuid [ref: > posts.id]
author_name varchar
body text
created_at timestamp
}