Hi Darragh,
 
can you please provide an example of how I could do this?
 


Date: Fri, 5 Nov 2010 03:49:57 -0700
From: ml-node+3251630-1672610580-143...@n5.nabble.com
To: apache...@hotmail.co.uk
Subject: RE: How to script database upgrade using ANT script

  


> -----Original Message----- 
> From: Java Jboss [mailto:[hidden email]] 
> Sent: 04 November 2010 22:43 
> To: [hidden email] 
> Subject: RE: How to script database upgrade using ANT script 
> 
> 
> 
> Hi Antoine, 
> 
> Thank you very much for providing me this example. 
> unfortunately I've been asked to use ANT only without using 
> unix shell scripts.  I have tried to tackle it as individual 
> modules using ANT script  running the 1st iteration of the 
> mysql scripts against newschema1.  I need to run each 
> iteration against all 4 schemas, then it would do a version 
> check and if version check wasn't met then it would start 2nd 
> iteration and so on. 
> 
> I would appreciate if you could take a look at the script and 
> assist. I need to create a recursive loop which I can't do 
> and also some error checking module as well as some how 
> linking these modules together so that they depend on each 
> other etc... At the moment I have to run each target on its own. 
>   
> Please feel free to change my novice attempt at writing an ANT script. 
>   
> Thank you 
>   
> <!-- *************************************** 
>   Restore MySQL database 
>   **************************************** -->   
> <target name="restore-db" > 
>     <!-- Clean up the database by deleting and then creating it. --> 
>     <antcall target="delete_db"/> 
>     <antcall target="create_db"/> 
> <!-- Import data from the backup file. --> 
>     <exec executable="${my.sql}" input="db_dumps/db1.sql"> 
>       <arg value="--user=root"/> 
>       <arg value="--password=<password>"/> 
>       <arg value="--host=localhost" />   
>       <arg value="--port=3306" />   
>       <arg value="<newschema1>"/> 
Take a look at the apply task to see if you can remove a number of mostly 
duplicated steps. 


-- 
Regards, 
Darragh Bailey 

--------------------------------------------------------------------- 
To unsubscribe, e-mail: [hidden email] 
For additional commands, e-mail: [hidden email] 






View message @ 
http://ant.1045680.n5.nabble.com/How-to-script-database-upgrade-using-ANT-script-tp3250375p3251630.html
 
To unsubscribe from How to script database upgrade using ANT script, click 
here. 
                                          
-- 
View this message in context: 
http://ant.1045680.n5.nabble.com/How-to-script-database-upgrade-using-ANT-script-tp3250375p3251660.html
Sent from the Ant - Users mailing list archive at Nabble.com.

Reply via email to