db-ddlutils-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christoffer Hammarström <krei...@imcode.com>
Subject Re: Renaming columns
Date Mon, 15 Jan 2007 09:59:09 GMT
Thomas Dudziak wrote:
> The problem is that there are two database models, the current one in
> the database, and the new, changed one, and the newer one contains
> different columns from the older one. Now, DdlUtils has no way of
> distinguish (via comparing these two models) that a column was renamed
> vs. that one column was dropped and another added.
> Adding support for this (which is essentially a refactoring) is tricky
> because it needs a concept of tasks ('rename') which means a new API
> and Ant tasks.
> 

Yes, Database refactoring is exactly what i need! :) Do you see this in
the future for ddlutils, and if so, when?

> One thing that you could do for now is to export the data to XML, then
> let DdlUtils drop and add the renamed column and then re-import the
> data again.
> 

I also need data from the dropped table before i drop it, and i've had
other problems, like DDLUTILS-150, and that dlutils insists that MySQL
has an index named "PRIMARY", which MySQL doesn't want to drop.

What i really am trying to do is refactoring databases, and since
ddlutils isn't "there" yet, and i'm running out of time, i'll just make
separate scripts for MySQL and MSSQL, which i had hoped to avoid.


Thank you very much for your advice!


Christoffer Hammarström
kreiger@imcode.com



Mime
View raw message