Arrays no longer supported?

Hi,

This tool has really come in handy for me, so I’m hoping that you can help me figure out an issue that just started showing up for me. In the past, I’ve been able to include things like varchar[] or int[] to denote arrays (I’m using Postgres) and that’s seemed to work well (though I haven’t gotten to the point of actually checking to see what the SQL generated looks like) when visualizing the design.

Since I checked it a few minutes ago this morning (and I haven’t checked it for a few days, so I can’t really say when this started), I started getting the following type of error on all my array markings:

image

Should arrays currently work in the tool? Did the parser maybe just get more strict and start erroneously flagging this as a syntax error, or was I maybe just using an “unsupported feature” previously?

Thanks for this awesome tool, and thanks in advance for your help.

Hi @Kenny, i’m Khoa from the Dbdiagram team. Thank you for your feedback.
We support array syntax with this syntax


So that we don’t get confused with the settings of pk, unique, increment, etc.

@Khoa_Huynh, thank you so much for your quick feedback!

Maybe I missed it in the documentation, or maybe (since it does seem to be a recent change of behavior) it’s just yet to be documented. At any rate, I’m glad that’s the case, and thanks again!

Hey @Khoa_Huynh. Thanks for the info. Would be nice if we can update the documentation regarding this type. It took me some time to find it :slight_smile:
Is it possible to have a default value for this array type?

Hi @Gabriel_Acasus, thank you for your feedback. We will update the documentation about support type and you can check it here https://www.dbml.org/home/

For the default value of array type, we support it like this.