Skip to main content

How do I specify the column data types in the ERD so that when I export to SQL it fills in the datatype for my SQL code (instead of putting in a placeholder for me to add it manually)?  As I make model changes I will need to export the code repeatedly and don't want to have to continually come back and edit the placeholders all over again.  Thanks.

Hi Bob 


Thanks for posting in the community! If I understand correctly it sounds like you are trying to export your ERD with foreign keys but the relationships are lost upon export. This is related to an open bug that has been reported this to our development team. I have added your information to the report. I apologize for any disruption this may cause and will update this thread when this issue is resolved. 


If I misunderstood what you are trying to do please let me know. Thanks again for posting!


 

No.. it appears that you misunderstood.  Let me try another way to phrase it.  When you export SQL code from your ERD it creates a "data type" placeholder in the SQL code (since it doesn't know what the data type should be).  But for me to go in and manually specify the data type for every single column in my ERD each and every time I make a tweak to the model and re-export the code would be terribly time consuming.  Is there a way to tell the model (from inside my Lucidchart ERD) what data type each column is in the ERD model for my various entities so it has that information from that point forward and fills it in automatically when it generates the code rather than putting a placeholder for me to have to fill in?


I was able to locate the answer in a YouTube video.  It appears I was simply using the wrong entity type in my model.  There is a 3 column entity type that allows me to specify the datatype.  I tested it and it seems to work just fine.  Thanks.


Hi Bob 


Thanks for following up on this! I apologize for my misunderstanding of what you were trying to do in my first response. I am so glad you were able to figure this out. I appreciate you posting about this so that others will now understand how to specify the datatype. 


Thanks!


Reply