Hi Satish,

could you post the definition of the existing table (i.e. the CREATE
TABLE statement), and the part from the schema XML that defines how
this table should look like ? Also, which MySql version are you using
?

Tom

On Feb 12, 2008 3:05 PM, Satish Yellanki <[EMAIL PROTECTED]> wrote:
> 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

Reply via email to