Forked from:
An Open Source solution for designing DB diagrams based on DBML (Database Markup Language). Initally this fork is intended for my personal usage but feel free to use it.
docker-compose up -d --build
yarn
quasar dev
yarn lint
quasar build
See Configuring quasar.conf.js.
Table main.users [headercolor: #5552ba] {
id integer [primary key, not null, unique]
username varchar
role varchar [default: 'reader']
created_at timestamp [default: `now()`]
indexes {
id
username
}
}
Table posts [headercolor: #d35400] {
id integer [primary key]
title varchar
body text [note: 'Content of the post']
user_id integer
created_at timestamp
}
Table comments {
id integram [primary key]
title varchar
body text
user_id integer
post_id integer
created_at integer
}
Table user_log {
id integer [primary key]
user_id integer
type actions.types [note: 'Type of user action']
indexes {
user_id
}
}
Table admin {
id integer [primary key]
user_id integer
type admin.types
}
Enum actions.types {
new_post
new_comment
new_visit
}
Enum admin.types {
moderator
global_admin
community_admin
}
Ref: posts.user_id > main.users.id // many-to-one
Ref: user_log.user_id > main.users.id // many-to-one
Ref: comments.post_id < posts.id // many-to-many
Ref: comments.user_id > main.users.id // many-to-one
Ref: admin.user_id - main.users.id // one to one
TableGroup "User" {
main.users
admin
}
TableGroup "User Actions" {
posts
comments
user_log
}