Question

I'd like to use the Database->Synchronize Model feature in MySQL Workbench to modify both my production database and a test database (used for automatic phpunit testing of a yii webapp). In the past I've copied the MWB EER model within MySQL Workbench, modified links to the database, and then synced. Before discovering Synchronize Model I used to use Forward Engineer, search/replace on database name, then run the SQL. Is there a better way?

Was it helpful?

Solution

Under the Model tab for a MWB EER diagram you can right click the name of your database in the tab under the window "Physical Schemata" and then just change the database table name before doing Database->Synchronize Model. That will force it to offer a checkbox in the wizard for the new database you'd like to sync to. Don't forget to change the database name back when you're done, though.

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