Skip to main content

🚀 Support Enum Syntax

Good news! You can now view your Enum in your fields!

View your predefined constants of a variable all in one database diagram. 😎

Syntax

Enum header_column {
predefined_1
predefined_2
:
}

Example

Enum orders_status {
created
running
done
failure
}

Table orders {
id int [pk]
user_id int [not null, unique]
status orders_status
created_at varchar [note: "When order created"]
}

When the user hovers the status field in the diagram, there is an auto-display drop-down of all the Enum values.


📝 Support Column Note

To help you make your diagrams more descriptive, dbdiagram.io now allows you to add notes into your columns!

Please refer to the syntax below to start adding your notes, then hover on the column fields to see your notes

field_name field_type [note: 'Winter is coming!!!']

column_note


✨ 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