-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Geometry/custom data types #11
Comments
Hi @duckontheweb, thanks for your post! You may define any data type, just as long as it is is a single word (remove all spaces in the data type). For instance, geography, JSON, decimal(1,2), custom_1, etc. The data type will still be reflected in your dbdiagram.io column definitions. Just curious, what caused you to have the impression that the data type was unsupported? Are there other ways you were expecting it to be supported? |
Hi @JiawenKor, |
Hi Raschan I'm not sure what you mean by defining object shape of such data type. Can you elaborate more pls? |
Hi @nvquanghuy, certainly. In our use case, we store a few JSON object in our db, as they can go a few levels deep, and they are mostly configurations, and they are a lot easier to manage as objects. For example one of the configs:
What I would like to use to describe the shape of the object is something like this:
|
@raschan at first look I like your idea, but what's the end result. Is this just for easier definition within the tool? The export is the same right? As far as I know, most databases don't allow you to define the JSON structure beyond saying that the column is JSON data. |
@mkaatman you can define JSON structure in your application DB models. The end result for custom type describing JSON fields would be a schema readability. Is there any info about this feature? |
Would also like this feature for our NoSQL database |
Hi, thanks for all your work on this project. I love having a simple language to express entity relationships and generate diagrams and documents. I did notice and appreciate that DBML accepts arbitrary type names. I think the detail that people are missing is that you can't attach notes or other characteristics to the types and reuse them succinctly in many places. If you've got a table like this:
We could instead write:
or even
This serves no purpose when there's only one reference to the custom type, but if you have 10 tables that all contain latitudes and longitudes and IDs following certain rules, this could factor out tons of notes describing ranges and constraints or structures. |
Thanks for putting this tool together, it's been very helpful so far!
I'm modeling a database that's going to include the PostGIS extension with geometry/geography data types. It looks like those data types are not currently supported. Is there any mechanism for defining custom data types within the schema that could then be used as data types in the column definitions?
The text was updated successfully, but these errors were encountered: