/[volute]/trunk/projects/theory/snapdm/build_db.xml
ViewVC logotype

Diff of /trunk/projects/theory/snapdm/build_db.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 645 by bourges.laurent, Thu Jun 26 10:46:17 2008 UTC revision 646 by bourges.laurent, Mon Jun 30 10:45:22 2008 UTC
# Line 1  Line 1 
1  <!--  <!--
2      build_db.xml file : specific targets for database management      build_db.xml file : specific targets for database management
3  -->    -->  
 <property name="ddl.test" location="${test}/ddl" />  
4    
5    
6  <!-- presets -->  <!-- presets -->
# Line 54  Line 53 
53    <echo>JDBC USER : ${eclipselink.jdbc.user}</echo>    <echo>JDBC USER : ${eclipselink.jdbc.user}</echo>
54    <echo>DDL HOME  : ${ddl.directory}</echo>    <echo>DDL HOME  : ${ddl.directory}</echo>
55    
   <delete includeemptydirs="false" verbose="true">  
     <fileset dir="${ddl.test}">  
       <include name="*.sql" />  
     </fileset>  
   </delete>  
     
   <copy verbose="true" overwrite="true" todir="${ddl.test}" preservelastmodified="true">  
     <fileset dir="${ddl.directory}">  
       <include name="*.sql" />  
     </fileset>  
   </copy>  
   
   <!-- removes multi line comments that cause problems with <sql> task -->  
   <replaceregexp match="/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+/" replace=" " byline="false" flags="g">  
     <fileset dir="${ddl.test}">  
       <include name="*.sql" />  
     </fileset>  
   </replaceregexp>  
     
56  </target>  </target>
57    
58    
# Line 89  Line 69 
69    
70    
71    
 <!--  
     src="data.sql"  
 -->  
   
   
72    
73  <!-- target cleanDB : drops views then tables -->  <!-- target cleanDB : drops views then tables -->
74  <target name="cleanDB" depends="initForDB">  <target name="cleanDB" depends="initForDB">
75    <echo>cleanDB : drop views then tables ...</echo>    <echo>cleanDB : drop views then tables ...</echo>
76    
77    <doSql autocommit="true" onerror="continue" src="${ddl.test}/SimDB_dropViews.sql" />    <doSql autocommit="true" onerror="continue" src="${ddl.directory}/SimDB_dropViews.sql" />
78    <doSql autocommit="true" onerror="continue" src="${ddl.test}/SimDB_dropTables.sql" />    <doSql autocommit="true" onerror="continue" src="${ddl.directory}/SimDB_dropTables.sql" />
79        
80    <echo>cleanDB : done.</echo>    <echo>cleanDB : done.</echo>
81  </target>  </target>
# Line 112  Line 87 
87  <target name="createDB" depends="cleanDB">  <target name="createDB" depends="cleanDB">
88    <echo>createDB : create tables then views ...</echo>    <echo>createDB : create tables then views ...</echo>
89    
90    <doSql onerror="abort" src="${ddl.test}/SimDB_createTables.sql" />    <doSql onerror="abort" src="${ddl.directory}/SimDB_createTables.sql" />
91    <doSql onerror="abort" src="${ddl.test}/SimDB_createViews.sql" />    <doSql onerror="abort" src="${ddl.directory}/SimDB_createViews.sql" />
92        
93    <echo>createDB : done.</echo>    <echo>createDB : done.</echo>
94  </target>  </target>

Legend:
Removed from v.645  
changed lines
  Added in v.646

msdemlei@ari.uni-heidelberg.de
ViewVC Help
Powered by ViewVC 1.1.26