DBML Syntax Update - Supports Unique, Primary Key, Null/Not Null. Please check our release notes for more details
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.
Update July 2023: This feature has been developed and released. Please see below for the official announcement. Thank you.
Good to know, thank you!
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
Hi Phuc_Nguyen,
Is it fixed ?
Hi @Ricky_Huang,
After some testing, I believe we have fixed this (at least in my provided example) following our DBML parser reworks.
Please let know if you encounter any issue naming the PK constraint.
Thanks
Hi Phuc_Nguyen,
Sorry for my question is not clear.
Has this feature “change PK name” been fixed ?
I exported to oracle SQL but it still didn’t produce the pk name I specified.
Hi @Ricky_Huang,
Indeed, we’re currently not exporting the PK constraint name in DBML to SQL in all of our SQL exporters. I will notify the team of this and let you know when it’s fixed.
Thank you for bringing this to our attention.