Hi, Select the right tool for the right job: For example scriptella http://scriptella.javaforge.com/ is a good tool for upgrading database.
And i think it does have an ant task also. Please check with the site. Regards, Vu --- En date de : Jeu 4.11.10, Java Jboss <apache...@hotmail.co.uk> a écrit : > De: Java Jboss <apache...@hotmail.co.uk> > Objet: How to script database upgrade using ANT script > À: user@ant.apache.org > Date: Jeudi 4 novembre 2010, 18h28 > > Hi, > > I’m a complete newbie to ANT and I need to write an ant > script which > upgrades a database version from base level 1.00 to a given > version number > by running a series of mysql (ver 5.1.45) scripts. > > Using ANT script I need to: > 1) create a database > 2) import mysql database(s) dump to a new schema > 3) check current database version > 4) then check if sql script1 exists > 4.1) if "No" then check for next sql script until it has > checked for all > scripts then "end" > 4.2) if "yes" then run first sql script then check if > second sql script > exists - if "yes" then run second sql script and so on > until the required > database version is reached. > 5) check database version is at correct level then > “end” or else start the > loop again > 6) how can I script error checking also > > Thank you all in advance. > > -- > View this message in context: > http://ant.1045680.n5.nabble.com/How-to-script-database-upgrade-using-ANT-script-tp3250375p3250375.html > Sent from the Ant - Users mailing list archive at > Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@ant.apache.org > For additional commands, e-mail: user-h...@ant.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org