db-ddlutils-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rasha <rasha.abdal...@murex.com>
Subject Why DDLUtils keeps create temporary tables even when operation is allowed in Driver
Date Thu, 29 Oct 2009 16:38:03 GMT

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
View raw message