MySQL Forums
Forum List  »  MySQL Workbench

Re: Synch via command-line?
Posted by: Jake Chung
Date: April 01, 2009 07:59AM

Thanks for the quick replies, Edwin.

Unfortunately, neither approaches really solve what I'm trying to do. Allow me to further explain what I'd like to do:

1) I currently use NSIS to package my product(only available for Windows), which can be used for initial installations or upgrades. When the product is installed for the first time, the CREATE SQL script is simply run on the machine. HOWEVER, I need to plan for upgrades where I want to change the database schema without having to drop the database and recreate a new one - I want to be able to alter the tables to preserve the data.

2) The upgrade option cannot make any assumptions about the previously existing database. For example, say that I make updates to my database schema in versions 1.2, 1.3, and 1.4 of my product. If a user upgrades from 1.2 to 1.4, the ALTER TABLE commands would be different from an upgrade from 1.3 to 1.4. So it's not as simple as pre-generating SQL scripts to alter the tables. I am looking for a way for the installer to be able to run an executable that will compare the live database against a CREATE SQL script, and then make the appropriate changes using ALTER commands. This is basically like an automated Synch feature without a GUI.

If you know of any third-party software that can do this, I'd also consider buying that, but it would be nice to have this feature in WorkBench, since I've already paid for the SE version.

Thanks again,

Options: ReplyQuote

Written By
March 31, 2009 07:28AM
March 31, 2009 10:40PM
March 31, 2009 10:42PM
Re: Synch via command-line?
April 01, 2009 07:59AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.