Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DataGrip diagram not showing table relationships

I have been having this odd issue where my DataGrip diagram generations do not showcase the relationships between tables (in other words, the relationship arrows do not appear).

Here is an image of what I am talking about.

I have been making this DataGrip diagram as such: Right click on my schema --> Diagrams --> Show Visualization. The above image is the result every time.

How can I fix this to show the arrows? And before you ask, I have foreign keys in my schema tables that reference other columns in other tables.

like image 935
TZK203 Avatar asked Nov 07 '22 07:11

TZK203


1 Answers

Make sure that foreign keys are declared properly.

check the column status in database details view on the left side.

If you are using mysql 8 , you might need to add ENGINE = INNODB after creating any table.

for example :

CREATE TABLE person
(
....
) ENGINE = INNODB;
like image 174
M.Kasaei Avatar answered Nov 13 '22 15:11

M.Kasaei