Re: Migration tool

From: Mark D Powell <Mark.Powell2_at_hp.com>
Date: Tue, 22 Dec 2009 10:15:55 -0800 (PST)
Message-ID: <98c4c468-68bc-41f4-8f2c-da23b5c987fa_at_y24g2000yqb.googlegroups.com>


On Dec 22, 5:10 am, "Álvaro G. Vicario"
<alvaro.NOSPAMTH..._at_demogracia.com.invalid> wrote:
> El 21/12/2009 22:27, Mark D Powell escribió:
>
>
>
>
>
> > On Dec 21, 2:09 pm, "Gerard H. Pille"<g..._at_skynet.be>  wrote:
> >> "Álvaro G. Vicario" wrote:
> >>> I have two file trees that correspond to two differerent versions of the
> >>> database schema for a web application I'm developing. These files
> >>> contain the SQL code to generate the objects (tables, sequences,
> >>> views...). I can find out what changed with any standard compare tool (I
> >>> use WinMerge). But it's hard to obtain a script with the appropriate
> >>> ALTER TABLE commands to migrate a live DB from one version to another.
>
> >>> Is there any free or open source tool I could use? I don't need it to
> >>> have fancy graphics or make everything for me; any improvement over
> >>> writing it all from scratch will be welcome. I'm interested in DB
> >>> structure, not data.
>
> >> Tora?
>
> > As inhttp://sourceforge.net/projects/tora/
>
> > Per the site as I have no experience with this tool:
>
> > TOra is a Toolkit for Oracle which aims to help the DBA or developer
> > of database applications. Features PL/SQL debugger, SQL worksheet with
> > syntax highlighting, DB browser and a full set of DBA tools. TOra also
> > includes support for MySQL and Postgres.
>
> Nice suggestion, I hadn't heard of this program. It has a tool called
> "DB Extraction/Compare/Search" that _seems_ to be able to do what I need
> (although I've spent like an hour trying to figure out how to do it,
> with no luck).
>
> --
> --http://alvaro.es- Álvaro G. Vicario - Burgos, Spain
> -- Mi sitio sobre programación web:http://borrame.com
> -- Mi web de humor satinado:http://www.demogracia.com
> --- Hide quoted text -
>
> - Show quoted text -

Helpfully you will figure it out. As I said I have never used the product and did not know of it till I read this thread. Just keep in mind that while the tool may generate the commands to make two tables look alike it will not be able to determine the sequence of events that resulted in the current state.

That is while the code might generate an add column command to add a new column and a drop column command to eliminate one no longer present it will not know the actual sequence of events was to add the new column, to update it with the data from another column, and then to drop that other column, which can be done via a column rename command now, but was done as described above in the past.

That is I am suggesting a manual review of the differences and the effect of the changes applying the changes.

HTH -- Mark D Powell -- Received on Tue Dec 22 2009 - 19:15:55 CET

Original text of this message