Author: tomdz Date: Sat Mar 8 05:15:45 2008 New Revision: 634951 URL: http://svn.apache.org/viewvc?rev=634951&view=rev Log: Changed to use the new API
Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/task/WriteSchemaToDatabaseCommand.java Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/task/WriteSchemaToDatabaseCommand.java URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/java/org/apache/ddlutils/task/WriteSchemaToDatabaseCommand.java?rev=634951&r1=634950&r2=634951&view=diff ============================================================================== --- db/ddlutils/trunk/src/java/org/apache/ddlutils/task/WriteSchemaToDatabaseCommand.java (original) +++ db/ddlutils/trunk/src/java/org/apache/ddlutils/task/WriteSchemaToDatabaseCommand.java Sat Mar 8 05:15:45 2008 @@ -104,25 +104,13 @@ { if (isAlterDatabase()) { - if ((getCatalogPattern() != null) || (getSchemaPattern() != null)) - { - platform.alterTables(getCatalogPattern(), - getSchemaPattern(), - null, - model, - params, - true); - } - else - { - platform.alterTables(model, - params, - true); - } + Database currentModel = platform.readModelFromDatabase(model.getName(), getCatalogPattern(), getSchemaPattern(), null); + + platform.alterModel(currentModel, model, params, true); } else { - platform.createTables(model, + platform.createModel(model, params, _doDrops, true);