Skip to main content

0️⃣ Zero-to-One/Many Relationships, Colors and more!

Valentine’s Day taught us relationships can be rock-solid or a little… optional 💔—and your database is no different! Our latest update lets you define optional or mandatory relationships, customize their colors, and add names to make your diagrams clearer and more meaningful.

Optional or Mandatory Relationships (free plan)

Using the nullable constraint on the foreign key, we can now automatically determine whether a relationship is optional (zero-to-one/many) or mandatory (one-to-one/many) for the parent entity. Take a look at our example below:

Table follows {
following_user_id int [ref: > users.id] // optional, many-to-zero relationship
followed_user_id int [ref: > users.id, null] // optional, many-to-zero relationship
}

Table posts {
id int [pk]
user_id int [ref: > users.id, not null] // mandatory, many-to-one relationship
}

Zero-to-one/many relationship

Custom Color for Relationship Lines (paid plan only)

Make your diagrams more readable by assigning custom colors to relationships. You can either pick up a color directly in the diagram or define it via DBML with this syntax:

Ref: posts.user_id > users.id [color: #aabbcc]

If not defined, the relationship line will inherit the parent table’s header color by default.

We’ve also added a flowing animation to show the direction of each relationship.

Custom color for relationship

Named Relationships (free plan)

Label your relationships in DBML and see the names pop up on hover in your diagram! These hover-triggered names make it a breeze to identify connections without cluttering the view.

The syntax for naming a relationship is as follows:

Ref user_posts: posts.user_id > users.id

Named relationship

We hope these enhancements improve your database design and communication experience. Try them out and let us know what you think.


🖼️ Embedded Views

Embedded Views Header Image

Database documentation is a key focus when designing and developing data-driven applications, yet it’s often scattered across multiple tools, making it hard to track and causing friction in technical discussions.

Introducing Embedded Views in dbdocs—a powerful new feature that allows you to seamlessly integrate your database diagrams and documentation into your favorite platforms like Notion, Confluence, and your own websites.

🎬 Watch this video! 🍿

Key Features:

  • 🏙️ Customizable Views: Handpick the tables you want to embed, toggle flexibly between Diagram or Document views and customize options like dark mode, version pinning, and more.
  • ⚡️ Live Updates: Your embedded content stays up-to-date with the latest changes in your database schema or pin to a specific version.
  • 🔗 Seamless Integration: Embed interactive diagrams and documentation directly into any documentation platforms you use daily like Notion, Confluence, and even your website.

To learn more, check out the doc here.

This feature is currently in beta and is available to all dbdocs users during this testing phase. We invite you to try out Embedding and share your feedback with us.

We believe this enhancement will greatly improve your database documentation and look forward to your feedback.


✍️ Allow others to edit your projects

We heard you. It has been lonely and challenging since you are the only person who can publish or update your database documentation. So we’re making it better.

Starting today, you can allow others to contribute to your projects by inviting them with “edit” permission.

Invite people with edit permission

Project editors will be able to:

  • ✅ Publish changes to invited projects via dbdocs CLI with command:
    dbdocs build <dbml file path> --project <username>/<project name>
  • ✅ Edit Markdown notes and diagram layouts directly on the document project page.

Project editor

This feature is included as part of our “Share with invited users” paid feature.

We believe this enhancement will greatly improve your database documentation and look forward to your feedback.


🎨 Support Notes & Color for Table Groups

You can now set customized colors and add notes to table groups.

Table Group Color

No more boring, grayed-out table groups that are difficult to spot when zoomed out, as you can now make them more colorful and distinct.

You can set a color for your table group by using the following syntax:

TableGroup "Order Management" [color: #E74C3C] {
...
}

Table Group Colors

Table Group Notes

Add Markdown descriptions for table groups to provide extra information, such as their purposes, specific details about child tables, and so on.

To add notes, use the following syntax:

TableGroup "User Wishlist System" [note: 'Manages the user wishlist functionality'] {
...

// or use multi-line string to define Markdown content
Note: '''
This group manages the user wishlist functionality.
- wishlists: Stores user-specific wishlists.
- wishlist_items: Contains items added to each wishlist.
'''
}

Add notes to table group

Both features are available as part of our paid Table Group feature set.

We believe this enhancement will greatly improve your database documentation, and we look forward to your feedback.


🏛 Schem️a Changelog: Track your database schema changes easily

schema-changelog

Database schema changes happen frequently and over long periods of development, often without a clear record of what changed or why. This makes it challenging to trace issues or understand the evolution of your schema.

Introducing Changelog – a powerful new feature within dbdocs that lets you track and view all updates to your database schema. See who made changes, what was updated, and when it happened. With versioning and detailed notes on modifications, you can easily identify the root cause of issues and keep your team informed.

schema-changelog-feature-walkthrough

🎬 Watch this video! 🍿

Stay on top of your database changes with Changelog in dbdocs. Read the doc here.

This feature is currently in beta phase and available to all dbdocs users, including free and paid tiers only during this phase.