Author: tomdz Date: Thu Jul 27 23:32:45 2006 New Revision: 426402 URL: http://svn.apache.org/viewvc?rev=426402&view=rev Log: Removed unused parameters from the alterTables/getAlterTableSql methods (fixes DDLUTILS-120)
Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/Platform.java db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/PlatformImplBase.java db/ddlutils/trunk/src/java/org/apache/ddlutils/task/WriteSchemaToDatabaseCommand.java db/ddlutils/trunk/src/test/org/apache/ddlutils/TestDatabaseWriterBase.java Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/Platform.java URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/java/org/apache/ddlutils/Platform.java?rev=426402&r1=426401&r2=426402&view=diff ============================================================================== --- db/ddlutils/trunk/src/java/org/apache/ddlutils/Platform.java (original) +++ db/ddlutils/trunk/src/java/org/apache/ddlutils/Platform.java Thu Jul 27 23:32:45 2006 @@ -329,49 +329,35 @@ * Alters the database schema so that it match the given model. * * @param desiredDb The desired database schema - * @param doDrops Whether columns, tables and indexes should be dropped if not in the - * new schema - * @param modifyColumns Whether columns should be altered for datatype, size as required * @param continueOnError Whether to continue with the next sql statement when an error occurred */ - public void alterTables(Database desiredDb, boolean doDrops, boolean modifyColumns, boolean continueOnError) throws DynaSqlException; + public void alterTables(Database desiredDb, boolean continueOnError) throws DynaSqlException; /** * Returns the SQL for altering the database schema so that it match the given model. * - * @param desiredDb The desired database schema - * @param doDrops Whether columns, tables and indexes should be dropped if not in the - * new schema - * @param modifyColumns Whether columns should be altered for datatype, size as required - * @param continueOnError Whether to continue with the next sql statement when an error occurred + * @param desiredDb The desired database schema * @return The SQL statements */ - public String getAlterTablesSql(Database desiredDb, boolean doDrops, boolean modifyColumns, boolean continueOnError) throws DynaSqlException; + public String getAlterTablesSql(Database desiredDb) throws DynaSqlException; /** * Alters the database schema so that it match the given model. * * @param desiredDb The desired database schema * @param params The parameters used in the creation - * @param doDrops Whether columns, tables and indexes should be dropped if not in the - * new schema - * @param modifyColumns Whether columns should be altered for datatype, size as required * @param continueOnError Whether to continue with the next sql statement when an error occurred */ - public void alterTables(Database desiredDb, CreationParameters params, boolean doDrops, boolean modifyColumns, boolean continueOnError) throws DynaSqlException; + public void alterTables(Database desiredDb, CreationParameters params, boolean continueOnError) throws DynaSqlException; /** * Returns the SQL for altering the database schema so that it match the given model. * - * @param desiredDb The desired database schema - * @param params The parameters used in the creation - * @param doDrops Whether columns, tables and indexes should be dropped if not in the - * new schema - * @param modifyColumns Whether columns should be altered for datatype, size as required - * @param continueOnError Whether to continue with the next sql statement when an error occurred + * @param desiredDb The desired database schema + * @param params The parameters used in the creation * @return The SQL statements */ - public String getAlterTablesSql(Database desiredDb, CreationParameters params, boolean doDrops, boolean modifyColumns, boolean continueOnError) throws DynaSqlException; + public String getAlterTablesSql(Database desiredDb, CreationParameters params) throws DynaSqlException; /** * Alters the database schema so that it match the given model. @@ -383,30 +369,23 @@ * @param tableTypes The table types to read from the existing database; * use <code>null</code> or an empty array for the platform-specific default value * @param desiredDb The desired database schema - * @param doDrops Whether columns, tables and indexes should be dropped if not in the - * new schema - * @param modifyColumns Whether columns should be altered for datatype, size as required * @param continueOnError Whether to continue with the next sql statement when an error occurred */ - public void alterTables(String catalog, String schema, String[] tableTypes, Database desiredDb, boolean doDrops, boolean modifyColumns, boolean continueOnError) throws DynaSqlException; + public void alterTables(String catalog, String schema, String[] tableTypes, Database desiredDb, boolean continueOnError) throws DynaSqlException; /** * Returns the SQL for altering the database schema so that it match the given model. * - * @param catalog The catalog in the existing database to read (can be a pattern); - * use <code>null</code> for the platform-specific default value - * @param schema The schema in the existing database to read (can be a pattern); - * use <code>null</code> for the platform-specific default value - * @param tableTypes The table types to read from the existing database; - * use <code>null</code> or an empty array for the platform-specific default value - * @param desiredDb The desired database schema - * @param doDrops Whether columns, tables and indexes should be dropped if not in the - * new schema - * @param modifyColumns Whether columns should be altered for datatype, size as required - * @param continueOnError Whether to continue with the next sql statement when an error occurred + * @param catalog The catalog in the existing database to read (can be a pattern); + * use <code>null</code> for the platform-specific default value + * @param schema The schema in the existing database to read (can be a pattern); + * use <code>null</code> for the platform-specific default value + * @param tableTypes The table types to read from the existing database; + * use <code>null</code> or an empty array for the platform-specific default value + * @param desiredDb The desired database schema * @return The SQL statements */ - public String getAlterTablesSql(String catalog, String schema, String[] tableTypes, Database desiredDb, boolean doDrops, boolean modifyColumns, boolean continueOnError) throws DynaSqlException; + public String getAlterTablesSql(String catalog, String schema, String[] tableTypes, Database desiredDb) throws DynaSqlException; /** * Alters the database schema so that it match the given model. @@ -419,56 +398,42 @@ * use <code>null</code> or an empty array for the platform-specific default value * @param desiredDb The desired database schema * @param params The parameters used in the creation - * @param doDrops Whether columns, tables and indexes should be dropped if not in the - * new schema - * @param modifyColumns Whether columns should be altered for datatype, size as required * @param continueOnError Whether to continue with the next sql statement when an error occurred */ - public void alterTables(String catalog, String schema, String[] tableTypes, Database desiredDb, CreationParameters params, boolean doDrops, boolean modifyColumns, boolean continueOnError) throws DynaSqlException; + public void alterTables(String catalog, String schema, String[] tableTypes, Database desiredDb, CreationParameters params, boolean continueOnError) throws DynaSqlException; /** * Returns the SQL for altering the database schema so that it match the given model. * - * @param catalog The catalog in the existing database to read (can be a pattern); - * use <code>null</code> for the platform-specific default value - * @param schema The schema in the existing database to read (can be a pattern); - * use <code>null</code> for the platform-specific default value - * @param tableTypes The table types to read from the existing database; - * use <code>null</code> or an empty array for the platform-specific default value - * @param desiredDb The desired database schema - * @param params The parameters used in the creation - * @param doDrops Whether columns, tables and indexes should be dropped if not in the - * new schema - * @param modifyColumns Whether columns should be altered for datatype, size as required - * @param continueOnError Whether to continue with the next sql statement when an error occurred + * @param catalog The catalog in the existing database to read (can be a pattern); + * use <code>null</code> for the platform-specific default value + * @param schema The schema in the existing database to read (can be a pattern); + * use <code>null</code> for the platform-specific default value + * @param tableTypes The table types to read from the existing database; + * use <code>null</code> or an empty array for the platform-specific default value + * @param desiredDb The desired database schema + * @param params The parameters used in the creation * @return The SQL statements */ - public String getAlterTablesSql(String catalog, String schema, String[] tableTypes, Database desiredDb, CreationParameters params, boolean doDrops, boolean modifyColumns, boolean continueOnError) throws DynaSqlException; + public String getAlterTablesSql(String catalog, String schema, String[] tableTypes, Database desiredDb, CreationParameters params) throws DynaSqlException; /** * Alters the database schema so that it match the given model. * * @param connection A connection to the existing database that shall be modified * @param desiredDb The desired database schema - * @param doDrops Whether columns, tables and indexes should be dropped if not in the - * new schema - * @param modifyColumns Whether columns should be altered for datatype, size as required * @param continueOnError Whether to continue with the next sql statement when an error occurred */ - public void alterTables(Connection connection, Database desiredDb, boolean doDrops, boolean modifyColumns, boolean continueOnError) throws DynaSqlException; + public void alterTables(Connection connection, Database desiredDb, boolean continueOnError) throws DynaSqlException; /** * Returns the SQL for altering the database schema so that it match the given model. * - * @param connection A connection to the existing database that shall be modified - * @param desiredDb The desired database schema - * @param doDrops Whether columns, tables and indexes should be dropped if not in the - * new schema - * @param modifyColumns Whether columns should be altered for datatype, size as required - * @param continueOnError Whether to continue with the next sql statement when an error occurred + * @param connection A connection to the existing database that shall be modified + * @param desiredDb The desired database schema * @return The SQL statements */ - public String getAlterTablesSql(Connection connection, Database desiredDb, boolean doDrops, boolean modifyColumns, boolean continueOnError) throws DynaSqlException; + public String getAlterTablesSql(Connection connection, Database desiredDb) throws DynaSqlException; /** * Alters the database schema so that it match the given model. @@ -476,26 +441,19 @@ * @param connection A connection to the existing database that shall be modified * @param desiredDb The desired database schema * @param params The parameters used in the creation - * @param doDrops Whether columns, tables and indexes should be dropped if not in the - * new schema - * @param modifyColumns Whether columns should be altered for datatype, size as required * @param continueOnError Whether to continue with the next sql statement when an error occurred */ - public void alterTables(Connection connection, Database desiredDb, CreationParameters params, boolean doDrops, boolean modifyColumns, boolean continueOnError) throws DynaSqlException; + public void alterTables(Connection connection, Database desiredDb, CreationParameters params, boolean continueOnError) throws DynaSqlException; /** * Returns the SQL for altering the database schema so that it match the given model. * - * @param connection A connection to the existing database that shall be modified - * @param desiredDb The desired database schema - * @param params The parameters used in the creation - * @param doDrops Whether columns, tables and indexes should be dropped if not in the - * new schema - * @param modifyColumns Whether columns should be altered for datatype, size as required - * @param continueOnError Whether to continue with the next sql statement when an error occurred + * @param connection A connection to the existing database that shall be modified + * @param desiredDb The desired database schema + * @param params The parameters used in the creation * @return The SQL statements */ - public String getAlterTablesSql(Connection connection, Database desiredDb, CreationParameters params, boolean doDrops, boolean modifyColumns, boolean continueOnError) throws DynaSqlException; + public String getAlterTablesSql(Connection connection, Database desiredDb, CreationParameters params) throws DynaSqlException; /** * Alters the database schema so that it match the given model. @@ -508,31 +466,24 @@ * @param tableTypes The table types to read from the existing database; * use <code>null</code> or an empty array for the platform-specific default value * @param desiredDb The desired database schema - * @param doDrops Whether columns, tables and indexes should be dropped if not in the - * new schema - * @param modifyColumns Whether columns should be altered for datatype, size as required * @param continueOnError Whether to continue with the next sql statement when an error occurred */ - public void alterTables(Connection connection, String catalog, String schema, String[] tableTypes, Database desiredDb, boolean doDrops, boolean modifyColumns, boolean continueOnError) throws DynaSqlException; + public void alterTables(Connection connection, String catalog, String schema, String[] tableTypes, Database desiredDb, boolean continueOnError) throws DynaSqlException; /** * Returns the SQL for altering the database schema so that it match the given model. * - * @param connection A connection to the existing database that shall be modified - * @param catalog The catalog in the existing database to read (can be a pattern); - * use <code>null</code> for the platform-specific default value - * @param schema The schema in the existing database to read (can be a pattern); - * use <code>null</code> for the platform-specific default value - * @param tableTypes The table types to read from the existing database; - * use <code>null</code> or an empty array for the platform-specific default value - * @param desiredDb The desired database schema - * @param doDrops Whether columns, tables and indexes should be dropped if not in the - * new schema - * @param modifyColumns Whether columns should be altered for datatype, size as required - * @param continueOnError Whether to continue with the next sql statement when an error occurred + * @param connection A connection to the existing database that shall be modified + * @param catalog The catalog in the existing database to read (can be a pattern); + * use <code>null</code> for the platform-specific default value + * @param schema The schema in the existing database to read (can be a pattern); + * use <code>null</code> for the platform-specific default value + * @param tableTypes The table types to read from the existing database; + * use <code>null</code> or an empty array for the platform-specific default value + * @param desiredDb The desired database schema * @return The SQL statements */ - public String getAlterTablesSql(Connection connection, String catalog, String schema, String[] tableTypes, Database desiredDb, boolean doDrops, boolean modifyColumns, boolean continueOnError) throws DynaSqlException; + public String getAlterTablesSql(Connection connection, String catalog, String schema, String[] tableTypes, Database desiredDb) throws DynaSqlException; /** * Alters the database schema so that it match the given model. @@ -546,32 +497,25 @@ * use <code>null</code> or an empty array for the platform-specific default value * @param desiredDb The desired database schema * @param params The parameters used in the creation - * @param doDrops Whether columns, tables and indexes should be dropped if not in the - * new schema - * @param modifyColumns Whether columns should be altered for datatype, size as required * @param continueOnError Whether to continue with the next sql statement when an error occurred */ - public void alterTables(Connection connection, String catalog, String schema, String[] tableTypes, Database desiredDb, CreationParameters params, boolean doDrops, boolean modifyColumns, boolean continueOnError) throws DynaSqlException; + public void alterTables(Connection connection, String catalog, String schema, String[] tableTypes, Database desiredDb, CreationParameters params, boolean continueOnError) throws DynaSqlException; /** * Returns the SQL for altering the database schema so that it match the given model. * - * @param connection A connection to the existing database that shall be modified - * @param catalog The catalog in the existing database to read (can be a pattern); - * use <code>null</code> for the platform-specific default value - * @param schema The schema in the existing database to read (can be a pattern); - * use <code>null</code> for the platform-specific default value - * @param tableTypes The table types to read from the existing database; - * use <code>null</code> or an empty array for the platform-specific default value - * @param desiredDb The desired database schema - * @param params The parameters used in the creation - * @param doDrops Whether columns, tables and indexes should be dropped if not in the - * new schema - * @param modifyColumns Whether columns should be altered for datatype, size as required - * @param continueOnError Whether to continue with the next sql statement when an error occurred + * @param connection A connection to the existing database that shall be modified + * @param catalog The catalog in the existing database to read (can be a pattern); + * use <code>null</code> for the platform-specific default value + * @param schema The schema in the existing database to read (can be a pattern); + * use <code>null</code> for the platform-specific default value + * @param tableTypes The table types to read from the existing database; + * use <code>null</code> or an empty array for the platform-specific default value + * @param desiredDb The desired database schema + * @param params The parameters used in the creation * @return The SQL statements */ - public String getAlterTablesSql(Connection connection, String catalog, String schema, String[] tableTypes, Database desiredDb, CreationParameters params, boolean doDrops, boolean modifyColumns, boolean continueOnError) throws DynaSqlException; + public String getAlterTablesSql(Connection connection, String catalog, String schema, String[] tableTypes, Database desiredDb, CreationParameters params) throws DynaSqlException; /** * Drops the tables defined in the given database. Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/PlatformImplBase.java URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/PlatformImplBase.java?rev=426402&r1=426401&r2=426402&view=diff ============================================================================== --- db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/PlatformImplBase.java (original) +++ db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/PlatformImplBase.java Thu Jul 27 23:32:45 2006 @@ -479,13 +479,13 @@ /** * [EMAIL PROTECTED] */ - public void alterTables(Database desiredDb, boolean doDrops, boolean modifyColumns, boolean continueOnError) throws DynaSqlException + public void alterTables(Database desiredDb, boolean continueOnError) throws DynaSqlException { Connection connection = borrowConnection(); try { - alterTables(connection, desiredDb, doDrops, modifyColumns, continueOnError); + alterTables(connection, desiredDb, continueOnError); } finally { @@ -496,13 +496,13 @@ /** * [EMAIL PROTECTED] */ - public String getAlterTablesSql(Database desiredDb, boolean doDrops, boolean modifyColumns, boolean continueOnError) throws DynaSqlException + public String getAlterTablesSql(Database desiredDb) throws DynaSqlException { Connection connection = borrowConnection(); try { - return getAlterTablesSql(connection, desiredDb, doDrops, modifyColumns, continueOnError); + return getAlterTablesSql(connection, desiredDb); } finally { @@ -513,13 +513,13 @@ /** * [EMAIL PROTECTED] */ - public void alterTables(Database desiredDb, CreationParameters params, boolean doDrops, boolean modifyColumns, boolean continueOnError) throws DynaSqlException + public void alterTables(Database desiredDb, CreationParameters params, boolean continueOnError) throws DynaSqlException { Connection connection = borrowConnection(); try { - alterTables(connection, desiredDb, params, doDrops, modifyColumns, continueOnError); + alterTables(connection, desiredDb, params, continueOnError); } finally { @@ -530,13 +530,13 @@ /** * [EMAIL PROTECTED] */ - public String getAlterTablesSql(Database desiredDb, CreationParameters params, boolean doDrops, boolean modifyColumns, boolean continueOnError) throws DynaSqlException + public String getAlterTablesSql(Database desiredDb, CreationParameters params) throws DynaSqlException { Connection connection = borrowConnection(); try { - return getAlterTablesSql(connection, desiredDb, params, doDrops, modifyColumns, continueOnError); + return getAlterTablesSql(connection, desiredDb, params); } finally { @@ -547,9 +547,9 @@ /** * [EMAIL PROTECTED] */ - public void alterTables(Connection connection, Database desiredModel, boolean doDrops, boolean modifyColumns, boolean continueOnError) throws DynaSqlException + public void alterTables(Connection connection, Database desiredModel, boolean continueOnError) throws DynaSqlException { - String sql = getAlterTablesSql(connection, desiredModel, doDrops, modifyColumns, continueOnError); + String sql = getAlterTablesSql(connection, desiredModel); evaluateBatch(connection, sql, continueOnError); } @@ -557,7 +557,7 @@ /** * [EMAIL PROTECTED] */ - public String getAlterTablesSql(Connection connection, Database desiredModel, boolean doDrops, boolean modifyColumns, boolean continueOnError) throws DynaSqlException + public String getAlterTablesSql(Connection connection, Database desiredModel) throws DynaSqlException { String sql = null; Database currentModel = readModelFromDatabase(connection, desiredModel.getName()); @@ -567,7 +567,6 @@ StringWriter buffer = new StringWriter(); getSqlBuilder().setWriter(buffer); - //getSqlBuilder().alterDatabase(currentModel, desiredModel, doDrops, modifyColumns); getSqlBuilder().alterDatabase(currentModel, desiredModel, null); sql = buffer.toString(); } @@ -581,9 +580,9 @@ /** * [EMAIL PROTECTED] */ - public void alterTables(Connection connection, Database desiredModel, CreationParameters params, boolean doDrops, boolean modifyColumns, boolean continueOnError) throws DynaSqlException + public void alterTables(Connection connection, Database desiredModel, CreationParameters params, boolean continueOnError) throws DynaSqlException { - String sql = getAlterTablesSql(connection, desiredModel, params, doDrops, modifyColumns, continueOnError); + String sql = getAlterTablesSql(connection, desiredModel, params); evaluateBatch(connection, sql, continueOnError); } @@ -591,7 +590,7 @@ /** * [EMAIL PROTECTED] */ - public String getAlterTablesSql(Connection connection, Database desiredModel, CreationParameters params, boolean doDrops, boolean modifyColumns, boolean continueOnError) throws DynaSqlException + public String getAlterTablesSql(Connection connection, Database desiredModel, CreationParameters params) throws DynaSqlException { String sql = null; Database currentModel = readModelFromDatabase(connection, desiredModel.getName()); @@ -601,7 +600,6 @@ StringWriter buffer = new StringWriter(); getSqlBuilder().setWriter(buffer); - //getSqlBuilder().alterDatabase(currentModel, desiredModel, params, doDrops, modifyColumns); getSqlBuilder().alterDatabase(currentModel, desiredModel, params); sql = buffer.toString(); } @@ -615,13 +613,13 @@ /** * [EMAIL PROTECTED] */ - public void alterTables(String catalog, String schema, String[] tableTypes, Database desiredModel, boolean doDrops, boolean modifyColumns, boolean continueOnError) throws DynaSqlException + public void alterTables(String catalog, String schema, String[] tableTypes, Database desiredModel, boolean continueOnError) throws DynaSqlException { Connection connection = borrowConnection(); try { - alterTables(connection, catalog, schema, tableTypes, desiredModel, doDrops, modifyColumns, continueOnError); + alterTables(connection, catalog, schema, tableTypes, desiredModel, continueOnError); } finally { @@ -632,13 +630,13 @@ /** * [EMAIL PROTECTED] */ - public String getAlterTablesSql(String catalog, String schema, String[] tableTypes, Database desiredModel, boolean doDrops, boolean modifyColumns, boolean continueOnError) throws DynaSqlException + public String getAlterTablesSql(String catalog, String schema, String[] tableTypes, Database desiredModel) throws DynaSqlException { Connection connection = borrowConnection(); try { - return getAlterTablesSql(connection, catalog, schema, tableTypes, desiredModel, doDrops, modifyColumns, continueOnError); + return getAlterTablesSql(connection, catalog, schema, tableTypes, desiredModel); } finally { @@ -649,13 +647,13 @@ /** * [EMAIL PROTECTED] */ - public void alterTables(String catalog, String schema, String[] tableTypes, Database desiredModel, CreationParameters params, boolean doDrops, boolean modifyColumns, boolean continueOnError) throws DynaSqlException + public void alterTables(String catalog, String schema, String[] tableTypes, Database desiredModel, CreationParameters params, boolean continueOnError) throws DynaSqlException { Connection connection = borrowConnection(); try { - alterTables(connection, catalog, schema, tableTypes, desiredModel, params, doDrops, modifyColumns, continueOnError); + alterTables(connection, catalog, schema, tableTypes, desiredModel, params, continueOnError); } finally { @@ -666,13 +664,13 @@ /** * [EMAIL PROTECTED] */ - public String getAlterTablesSql(String catalog, String schema, String[] tableTypes, Database desiredModel, CreationParameters params, boolean doDrops, boolean modifyColumns, boolean continueOnError) throws DynaSqlException + public String getAlterTablesSql(String catalog, String schema, String[] tableTypes, Database desiredModel, CreationParameters params) throws DynaSqlException { Connection connection = borrowConnection(); try { - return getAlterTablesSql(connection, catalog, schema, tableTypes, desiredModel, params, doDrops, modifyColumns, continueOnError); + return getAlterTablesSql(connection, catalog, schema, tableTypes, desiredModel, params); } finally { @@ -683,9 +681,9 @@ /** * [EMAIL PROTECTED] */ - public void alterTables(Connection connection, String catalog, String schema, String[] tableTypes, Database desiredModel, boolean doDrops, boolean modifyColumns, boolean continueOnError) throws DynaSqlException + public void alterTables(Connection connection, String catalog, String schema, String[] tableTypes, Database desiredModel, boolean continueOnError) throws DynaSqlException { - String sql = getAlterTablesSql(connection, catalog, schema, tableTypes, desiredModel, doDrops, modifyColumns, continueOnError); + String sql = getAlterTablesSql(connection, catalog, schema, tableTypes, desiredModel); evaluateBatch(connection, sql, continueOnError); } @@ -693,7 +691,7 @@ /** * [EMAIL PROTECTED] */ - public String getAlterTablesSql(Connection connection, String catalog, String schema, String[] tableTypes, Database desiredModel, boolean doDrops, boolean modifyColumns, boolean continueOnError) throws DynaSqlException + public String getAlterTablesSql(Connection connection, String catalog, String schema, String[] tableTypes, Database desiredModel) throws DynaSqlException { String sql = null; Database currentModel = readModelFromDatabase(connection, desiredModel.getName(), catalog, schema, tableTypes); @@ -703,7 +701,6 @@ StringWriter buffer = new StringWriter(); getSqlBuilder().setWriter(buffer); - //getSqlBuilder().alterDatabase(currentModel, desiredModel, doDrops, modifyColumns); getSqlBuilder().alterDatabase(currentModel, desiredModel, null); sql = buffer.toString(); } @@ -717,9 +714,9 @@ /** * [EMAIL PROTECTED] */ - public void alterTables(Connection connection, String catalog, String schema, String[] tableTypes, Database desiredModel, CreationParameters params, boolean doDrops, boolean modifyColumns, boolean continueOnError) throws DynaSqlException + public void alterTables(Connection connection, String catalog, String schema, String[] tableTypes, Database desiredModel, CreationParameters params, boolean continueOnError) throws DynaSqlException { - String sql = getAlterTablesSql(connection, catalog, schema, tableTypes, desiredModel, params, doDrops, modifyColumns, continueOnError); + String sql = getAlterTablesSql(connection, catalog, schema, tableTypes, desiredModel, params); evaluateBatch(connection, sql, continueOnError); } @@ -727,7 +724,7 @@ /** * [EMAIL PROTECTED] */ - public String getAlterTablesSql(Connection connection, String catalog, String schema, String[] tableTypes, Database desiredModel, CreationParameters params, boolean doDrops, boolean modifyColumns, boolean continueOnError) throws DynaSqlException + public String getAlterTablesSql(Connection connection, String catalog, String schema, String[] tableTypes, Database desiredModel, CreationParameters params) throws DynaSqlException { String sql = null; Database currentModel = readModelFromDatabase(connection, desiredModel.getName(), catalog, schema, tableTypes); @@ -737,7 +734,6 @@ StringWriter buffer = new StringWriter(); getSqlBuilder().setWriter(buffer); - //getSqlBuilder().alterDatabase(currentModel, desiredModel, params, doDrops, modifyColumns); getSqlBuilder().alterDatabase(currentModel, desiredModel, params); sql = buffer.toString(); } 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=426402&r1=426401&r2=426402&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 Thu Jul 27 23:32:45 2006 @@ -104,16 +104,12 @@ null, model, params, - _doDrops, - true, true); } else { platform.alterTables(model, params, - _doDrops, - true, true); } } Modified: db/ddlutils/trunk/src/test/org/apache/ddlutils/TestDatabaseWriterBase.java URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/src/test/org/apache/ddlutils/TestDatabaseWriterBase.java?rev=426402&r1=426401&r2=426402&view=diff ============================================================================== --- db/ddlutils/trunk/src/test/org/apache/ddlutils/TestDatabaseWriterBase.java (original) +++ db/ddlutils/trunk/src/test/org/apache/ddlutils/TestDatabaseWriterBase.java Thu Jul 27 23:32:45 2006 @@ -269,7 +269,7 @@ _model.resetDynaClassCache(); getPlatform().setSqlCommentsOn(false); - getPlatform().alterTables(catalog, schema, null, _model, true, true, false); + getPlatform().alterTables(catalog, schema, null, _model, false); } catch (Exception ex) { @@ -342,7 +342,7 @@ String catalog = props.getProperty(DDLUTILS_PROPERTY_PREFIX + "catalog"); String schema = props.getProperty(DDLUTILS_PROPERTY_PREFIX + "schema"); - return getPlatform().getAlterTablesSql(catalog, schema, null, desiredModel, true, true, true); + return getPlatform().getAlterTablesSql(catalog, schema, null, desiredModel); } /**