db-ddlutils-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hyzer <mchy...@yahoo.com>
Subject Re: Why DDLUtils keeps create temporary tables even when operation is allowed in Driver
Date Wed, 18 Nov 2009 20:22:03 GMT
I have a situation where I am using the ddlutils API for postgres, and I add a bunch of columns
in a table (nullable, no default value), and it creates a temporary table.  I look in ddlutils
and the source code is completely different from the latest stable jar... when is the next
version being released so I can see if the issue exists in the latest code?

Thanks,
Chris



________________________________
From: Rasha <rasha.abdallah@murex.com>
To: ddlutils-user@db.apache.org
Sent: Thu, October 29, 2009 11:38:03 AM
Subject: Why DDLUtils keeps create temporary tables even when operation is allowed in Driver


Hi, 

I was searching the mailing list for an explanation on why DDLUtils attempt
to resolve most operations by creating a temporary table, migrating data to
it, dropping and recreating original column. 
According to the post in
http://www.nabble.com/Plataform.getAlterTablesSql-results-ts4864470.html#a4864470 
This should happen only if the implementation does not support the requested
operation. 

In my case, I am using a Derby database, and I am attempting to do a
ColumnRequiredChange 

Original Table:
<table name="author">
    <column name="author_id" type="INTEGER" primaryKey="true" required="true"
/>
    <column name="author_name" type="VARCHAR" size="50" required="true" />
    <column name="organisation" type="VARCHAR" size="50" required="true" />
</table>


Desired Model 

<table name="author">
    <column name="author_id" type="INTEGER" primaryKey="true" required="true"
/>
    <column name="author_name" type="VARCHAR" size="50" required="true" />
    <column name="organisation" type="VARCHAR" size="50" required="false" />
</table>

I do not understand why in this case, the table is being dropped and
recreated. 
Although derby supports doing 

alter table author
alter organisation null


Thanks for your help 
Rasha

-- 
View this message in context: http://www.nabble.com/Why-DDLUtils-keeps-create-temporary-tables-even-when-operation-is-allowed-in-Driver-tp26116530p26116530.html
Sent from the Apache DdlUtils - User mailing list archive at Nabble.com.


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