Question

I can't see connections (foreign keys) in database diagram generated with intellij (using phpstorm 6.0.3). Here is video showing some intelij features and that guys has his foreing keys visible and linked. And here is my screenshot. Any idea why? Is it a bug?

Here is short table generating code example copied from my db:

Create table Book (
  id Integer Not Null Auto_increment,
  Ad_id Integer Not Null,
  title VarChar(150) Not Null,
  isbn VarChar(80) Null,      
  Constraint PK_Book Primary Key (id)
);
Create table Ad (
  id Integer Not Null Auto_increment,      
  displayed Integer Not Null,
  price Integer Not Null,
  inserted Integer Not Null,
  Constraint PK_Ad Primary Key (id)
);    
Alter table Book add (
  Constraint FK_Book_1 Foreign Key (Ad_id) References Ad(id) On Update Cascade On Delete Cascade
);
Was it helpful?

Solution

It was definately bug. The diagram sometimes shows foreign keys and sometimes not with very same sql script generating the database. I have a feeling it is coused by bad synchronisation but I have nothing to prove it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top