Dbdiagram.io DBML Syntax Update - Supports Unique, Primary Key, Null/Not Null

DBML Syntax Update - Supports Unique, Primary Key, Null/Not Null. Please check our release notes for more details

Inline References for foreign keys (Inline Relationships)

Supports unique, primary key, null and not null

Hi Anthony,

is it possible to visualize “not null” on the db diagram? Currently I don’t see any impact of this constraint.

Regards
Slavik

Hi Slavsla,

We only support them for import/export feature, however, this is a great suggestion, we have added it to our backlog and will think about how to make it better.

Thanks,
Anthony

The links from anthony.do appear to be phishing links.

Thank you for reporting the problem, @Go_Ideal_Software.

We updated the outdated links.

Update July 2023: This feature has been developed and released. Please see below for the official announcement. Thank you.

Good to know, thank you! :+1:

1 Like

So we cant change PK name?

Hi rolivares,

So we cant change PK name?

Unfortunately, no. In theory, you could define the PK constraint as in an index and give a name to it like this:

Table "test_table" {
  "name" varchar [not null]
  "id" varchar
  "linked_name" varchar [not null]

Indexes {
  (id) [pk, name: "test_table_pk"]
}
}

However, there’s currently a bug that prevents the index pk setting from being used together with other settings such as name. We will fix this soon and after that, you can use this scheme to name pk constraints in dbml.

I hope this helps.

Thanks.

ok, I’be checking that correction. Thanks