db-ddlutils-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Satish Yellanki" <satish.yella...@ineoquest.com>
Subject Problem with using DdlUtils with MySql
Date Tue, 12 Feb 2008 23:05:17 GMT
Hello,

 

I am trying to use DdlUtil with MySql database to upgrade from one
version to another. I create a model file from the latest schema and try
to alter an existing database to match that file. However, there is
problem with the default values.

 

Some of the columns have default values defined as "" (empty string),
while some don't have any default values. However, the DdlUtils package
out of the box is treating them the same... the xml output I create does
not have any default values in it.

 

When I add a new column to the database which is "NOT NULL" and has a
default value of "", the utility is trying to delete the existing table
and recreate it. I understand that this is because the utility assumes
there is no default value and since it cannot add a NOT NULL column
without a default, it is deleting and re-creating the table.

 

Is there a way I can make MySql handler treat the "" (Empty String) and
null values differently and also, save the "" default values in the
model file? This could potentially solve my problem.

 

Thanks,

Satish

 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message