Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can you add an existing table to an existing model in MySQL Workbench?

I'm working with MySQL Workbench and really like the Model feature, but what do I do if I create a Model and forget a table? Can you add an existing table to a model you're working in or do you have to start from scratch and re-import every time? I haven't seen any answers after some initial googling. Thank you in advance for the assistance!

like image 494
Jimmathy Avatar asked Jun 27 '16 20:06

Jimmathy


2 Answers

Go to Database menu, Synchronize Model, follow the wizard, but on the "Select Changes to Apply" step, make sure you change the arrow direction to "Update Model". You can either double click on the arrow to change it, or click the button "Update Model". You have to do this for each object. If you just add one table, "Ignore" all of the changes, and just select the one table and choose "Update Model" for it. Image borrowed from google image search: enter image description here

like image 96
Thierry_S Avatar answered Sep 21 '22 12:09

Thierry_S


Copy the table you want to place in the model from the model with ctrl-c and place it to the EER diagram with ctrl-v.

like image 34
René Nyffenegger Avatar answered Sep 22 '22 12:09

René Nyffenegger