db-ddlutils-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Big Jim <big...@speakeasy.net>
Subject Re: Problem With Platform.alterTables(Database, boolean, boolean, boolean)
Date Fri, 28 Jul 2006 11:16:47 GMT
Thomas Dudziak wrote:
> On 7/27/06, Big Jim <bigjim@speakeasy.net> wrote:
>
>> I am using dbutils to update a MSSQL database.  My code contains the
>> following statement:  platform.alterTables(database, false, true,
>> false); which according to the API doc should tell dbuitls to NOT
>> attempt to drop columns in the existing database.table that are not in
>> the xml schema.  Despite setting the dodrop flag to false dbutils is
>> attempting to drop the colomn.  This would not be a problem except that
>> the column has a default constraint which is not being dropped first
>> which causes an SQL exception can't drop column because it depends on
>> constraint.  Is there a way around this other then to put the column in
>> question back into the schema so dbutils does not try to drop it?
>
> Ups, yes, this parameter are legacy (I created an issue so that we
> don't forget to remove these flags).
> The current alteration algorithm will change the database so that it
> matches the given model. If you want to maintain the column, then
> you'll have to put it into this model.
> If however you want to drop it, and this fails, then please open a
> JIRA issue for this as it is apparently a bug.
>
> Tom
>
>
>
I have no problem with it dropping the column.  However it fails to drop 
all the dependent constraints first and then fails.  Is that a bug or am 
I doing something wrong in the model?

Jim


Mime
View raw message