I’d love to be able to specify if the INT is SIGNED or UNSIGNED.
Would provide a lot of value.
I’d love to be able to specify if the INT is SIGNED or UNSIGNED.
Would provide a lot of value.
I agree with @WELZ. I see that unsigned is labelled as a keyword by the dbdiagram.io web app, however when used it throws an error.
@huy will this be implemented anytime soon?
Is there any news on this?
Ah, came looking to post something asking about this very thing. Was this ever added?
You can do it like this: id “bigint unsigned”. This solution included in oficial documentation
Any news for this?
While we could use [column] “int unsigned”, it’s still a hacky solution for something that is still not supported.
I tried to use “bigint unsigned” as proposed in the manual. But it fails with “(165:7) Invalid column type”. So, will there be any update to the app that will allow “unsigned” flag? Or am I missing something?
Hi @sjiamnocna,
The syntax works fine. Here is an example:
Table users {
id "bigint unsigned" [pk]
username varchar(255) [not null, unique]
}
Result: dbdiagram.io - Database Relationship Diagrams Design Tool
Could you share the screenshot or the DBML content that caused the error?
I suppose I had some bad character in there.
It solved by copy pasting your code.
Thanks.
As of today, ‘myfieldname mediumint unsigned’ still throws an error: ‘Inline column settings can only be pk or unique’.
It’s so strange 5.5 years weren’t enough to implement this feature.
Hi @DadManBlues,
The syntax you are currently using is deprecated. We maintain support for this older format primarily to ensure backward compatibility for existing projects. However, it only supports the pk and unique attributes, and it does not support the unsigned attribute (which is why you encountered the error).
To specify the unsigned attribute for your column, the current workaround is to include it along with the type definition within double quotes, as demonstrated in the following example:
Table users {
id "mediumint unsigned" [pk]
username varchar(255) [not null, unique]
}
You can see Syntax | DBML for more details.
We have noted your suggestion regarding a more direct way to specify signed/unsigned integer types and will let you know if we consider implementing it in the future.