db-ddlutils-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jun Li" <allanju...@gmail.com>
Subject Re: Alter column issue.
Date Tue, 30 Jan 2007 09:06:34 GMT
I'm not dropping the column but alter the data type of it, therefore the
schema is certainly valid. At least on SQL Server, if there are indices
reference the column which needs to be altered, the sql statements generated
by DdlUtils will fail. In this case, the indices need to be handled just
like fk constraints.

On 1/30/07, Thomas Dudziak <tomdzk@gmail.com> wrote:
> On 1/29/07, Jun Li <allanjunli@gmail.com> wrote:
> > The problem was if there were indices referencing the column, the
> indices
> > didn't get dropped and recreated afterwards just like foreign
> > key constrains. For primary key columns, it's the primary key constrain
> > needs to be take care of (drop before alter the column and recreate
> > afterwards).
> DdlUtils will drop nothing automatically if you're using the API, you
> have to remove constraints and index yourself from the model.
> When using the Ant tasks, the target schema must be a valid schema, so
> it cannot contain e.g. foreign keys using non-existing columns.
> Tom


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