Question

I'm new to CakePHP & Mysql Workbench and i just did a reverse engineer to a a open source application built with cakephp(Croogo CMS). In order to better understand the relations between tables I'll like to draw them, but using the mysql workbench the tables are getting new columns as foreign keys. I assume this isn't the right way to do it.

My questions are:
1) How to use mysql workbench in order to draw/see the relations between tables?
2) Do you know where can I find a EER mysql workbench diagram which use the cakephp convention and can help me to figure out, how this thing has to work?

Was it helpful?

Solution

The problem is that this CMS doesn't set proper relations in the database. That's why they are not retrieved from the DB.

If you know what is the relations between the tables (hopefully the Croogo CMS follow the Cake naming conventions) you can set relations between the tables by the icon "Place Relationship Using Existing Columns" (it's the last icon in the relation's toolbar). You need to select a column from a child table and then select the id column of the master table and the relation will be created.

Bear in mind that at least for me Workbench is a little bit unstable and crashes unsuspectingly - so save regularly your changes :)

OTHER TIPS

You may find these graphics my Andy Dawson useful: https://github.com/AD7six/croogo/tree/mi/config/schema/graphics/

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