You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ddlutils-dev@db.apache.org by to...@apache.org on 2005/12/06 21:05:27 UTC

svn commit: r354529 - /db/ddlutils/trunk/src/java/org/apache/ddlutils/task/WriteSchemaSqlToFileCommand.java

Author: tomdz
Date: Tue Dec  6 12:05:22 2005
New Revision: 354529

URL: http://svn.apache.org/viewcvs?rev=354529&view=rev
Log:
The writeSchemaSqlToFile task now generates normal creation SQL if both alterdatabase=true is specified and a data source is defined

Modified:
    db/ddlutils/trunk/src/java/org/apache/ddlutils/task/WriteSchemaSqlToFileCommand.java

Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/task/WriteSchemaSqlToFileCommand.java
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/java/org/apache/ddlutils/task/WriteSchemaSqlToFileCommand.java?rev=354529&r1=354528&r2=354529&view=diff
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/task/WriteSchemaSqlToFileCommand.java (original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/task/WriteSchemaSqlToFileCommand.java Tue Dec  6 12:05:22 2005
@@ -117,13 +117,8 @@
             FileWriter writer = new FileWriter(_outputFile);
 
             platform.getSqlBuilder().setWriter(writer);
-            if (isAlterDatabase())
+            if (isAlterDatabase() && (getDataSource() != null))
             {
-                if (getDataSource() == null)
-                {
-                    throw new BuildException("No database specified.");
-                }
-
                 Database currentModel = platform.readModelFromDatabase();
 
                 platform.getSqlBuilder().alterDatabase(currentModel, model, params, _doDrops, true);