db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject svn commit: r572517 - /db/ddlutils/trunk/build-sample.xml
Date Tue, 04 Sep 2007 04:48:24 GMT
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>



Mime
View raw message