From f9c969cb92715dc1a1902ad2d5640f93c8522965 Mon Sep 17 00:00:00 2001
From: Peter Hormanns <peter.hormanns@hostsharing.net>
Date: Fri, 25 Mar 2011 18:37:16 +0100
Subject: [PATCH] drop tables

---
 hsarback/build.xml |   19 +++++++++++++++----
 1 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/hsarback/build.xml b/hsarback/build.xml
index b891cfb..9740ed6 100644
--- a/hsarback/build.xml
+++ b/hsarback/build.xml
@@ -7,6 +7,8 @@
 	<property name="src.home" value="${basedir}/src" />
 	<property name="dist.home" value="${basedir}/dist" />
 
+	<property file="${user.home}/.hsar.ant.properties" />
+	
 	<!-- Optionen  für Java-Compiler-->
 	<property name="compile.debug" value="true" />
 	<property name="compile.deprecation" value="true" />
@@ -74,15 +76,24 @@
 		<sql
 			classpath="/usr/share/java/postgresql-jdbc3-8.2.jar"
 			driver="org.postgresql.Driver" 
-			url="jdbc:postgresql://localhost:5432/hsh02_hsdb1" 
-			userid="hsh02_hsdb" password="Phoh9t" 
+			url="jdbc:postgresql://localhost:5432/${database.name}"
+			userid="${database.user}" password="${database.password}" 
 			src="database/schema.sql" />		
 		<sql
 			classpath="/usr/share/java/postgresql-jdbc3-8.2.jar"
 			driver="org.postgresql.Driver" 
-			url="jdbc:postgresql://localhost:5432/hsh02_hsdb1" 
-			userid="hsh02_hsdb" password="Phoh9t" 
+			url="jdbc:postgresql://localhost:5432/${database.name}"
+			userid="${database.user}" password="${database.password}" 
 			src="database/data.sql" />		
 	</target>
 	
+	<target name="drop-db" description="make empty database">
+		<sql
+			classpath="/usr/share/java/postgresql-jdbc3-8.2.jar"
+			driver="org.postgresql.Driver" 
+			url="jdbc:postgresql://localhost:5432/${database.name}"
+			userid="${database.user}" password="${database.password}" 
+			src="database/dropschema.sql" />		
+	</target>
+	
 </project>

--
Gitblit v1.9.0-SNAPSHOT