db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject svn commit: r354529 - /db/ddlutils/trunk/src/java/org/apache/ddlutils/task/WriteSchemaSqlToFileCommand.java
Date Tue, 06 Dec 2005 20:05:27 GMT
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);



Mime
View raw message