Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 14965 invoked from network); 4 Nov 2010 16:27:58 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 4 Nov 2010 16:27:58 -0000 Received: (qmail 56606 invoked by uid 500); 4 Nov 2010 16:28:29 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 56555 invoked by uid 500); 4 Nov 2010 16:28:28 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 56547 invoked by uid 99); 4 Nov 2010 16:28:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Nov 2010 16:28:28 +0000 X-ASF-Spam-Status: No, hits=2.3 required=10.0 tests=FREEMAIL_FROM,SPF_HELO_PASS,SPF_SOFTFAIL,T_TO_NO_BRKTS_FREEMAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: softfail (athena.apache.org: transitioning domain of apacheant@hotmail.co.uk does not designate 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Nov 2010 16:28:23 +0000 Received: from sam.nabble.com ([192.168.236.26]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1PE2fS-0000Ii-66 for user@ant.apache.org; Thu, 04 Nov 2010 09:28:02 -0700 Date: Thu, 4 Nov 2010 09:28:02 -0700 (PDT) From: Java Jboss To: user@ant.apache.org Message-ID: <1288888082171-3250375.post@n5.nabble.com> Subject: How to script database upgrade using ANT script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi, I=E2=80=99m a complete newbie to ANT and I need to write an ant script whic= h 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 =E2=80=9Cend=E2=80=9D or= else start the loop again=20 6) how can I script error checking also Thank you all in advance. --=20 View this message in context: http://ant.1045680.n5.nabble.com/How-to-scrip= t-database-upgrade-using-ANT-script-tp3250375p3250375.html Sent from the Ant - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org