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 2007/09/04 06:48:24 UTC

svn commit: r572517 - /db/ddlutils/trunk/build-sample.xml

Author: tomdz
Date: Mon Sep  3 21:48:24 2007
New Revision: 572517

URL: http://svn.apache.org/viewvc?rev=572517&view=rev
Log:
Added sample target for dumping the schema from the database to XML.

Modified:
    db/ddlutils/trunk/build-sample.xml

Modified: db/ddlutils/trunk/build-sample.xml
URL: http://svn.apache.org/viewvc/db/ddlutils/trunk/build-sample.xml?rev=572517&r1=572516&r2=572517&view=diff
==============================================================================
--- db/ddlutils/trunk/build-sample.xml (original)
+++ db/ddlutils/trunk/build-sample.xml Mon Sep  3 21:48:24 2007
@@ -29,6 +29,7 @@
 
   <!-- These properties can be overriden on the commandline using -D --> 
   <property name="schemafiles" value="testmodel.xml"/>
+  <property name="schemafile" value="testmodel.xml"/>
   <property name="datafile" value="testdata.xml"/>
   <property name="catalogpattern" value=""/>
   <property name="schemapattern" value=""/>
@@ -90,6 +91,21 @@
     </ddlToDatabase> 
   </target>
 
+  <target name="readSchemaFromDb">
+    <databaseToDdl usedelimitedsqlidentifiers="${delimitedsqlidentifiers}"
+                   catalogpattern="${catalogpattern}"
+                   schemapattern="${schemapattern}"
+                   databasetype="${platform}"
+                   verbosity="${verbosity}">
+      <database driverclassname="${datasource.driverClassName}"
+                url="${datasource.url}"
+                username="${datasource.username}"
+                password="${datasource.password}"/> 
+
+      <writeschematofile outputfile="${schemafile}"/>
+    </databaseToDdl> 
+  </target>
+
   <target name="writeSchemaSqlToFile">
     <ddlToDatabase validatexml="false" 
                    usedelimitedsqlidentifiers="${delimitedsqlidentifiers}"
@@ -143,6 +159,7 @@
                 url="${datasource.url}"
                 username="${datasource.username}"
                 password="${datasource.password}"/> 
+
       <writedatatofile outputfile="${datafile}"/>
     </databaseToDdl> 
   </target>