Skip to main content

✨ Support Inline References

dbdiagram.io now supports Inline References for foreign keys (Inline Relationships)

Syntax

field_name type [ref: > other_table.field_name]

Examples

Table posts {
id integer [primary key]
user_id integer [ref: > users.id] // many-to-one
}

// or this
Table users {
id integer [ref: < posts.user_id, ref: < reviews.user_id] // one to many
}

🔑 Support unique, primary key, null and not null

😍 Yay! dbdiagram.io now supports unique, primary key, null and not null for columns. Use the syntax below to export your diagrams with the new attributes.

Table users {
id integer [primary key]
username varchar [not null, unique]
full_name type [not null]
.....
}

📅 March Updates

  • View-only mode for viewers
  • Better experience when switching between documents
  • Better error console



📅 January Updates

  • Toggle to highlight the relationship indicators all the time
  • Better experience when viewing foreign diagrams (Viewer can't view the code only, if they want to edit, they have to create as new)