Thanks for the clarification Daan.
Regards Alex Hitchins D: +44 1892 523 587 | S: +44 2036 030 540 | M: +44 7788 423 969 alex.hitch...@shapeblue.com -----Original Message----- From: Daan Hoogland [mailto:daan.hoogl...@gmail.com] Sent: 06 March 2014 10:54 To: dev Subject: Re: [DISCUSS] Checking in code that will break others' environments On Thu, Mar 6, 2014 at 11:28 AM, Alex Hitchins <alex.hitch...@shapeblue.com> wrote: > I agree too with this approach. One thing I'm not too familiar with is how > the current SQL versioning handled? I know of the schema-xxtoxx sql files but > not so much how this are arranged. > H Alex, The present upgrades are on a per release basis. This means that you can upgrade from released versions to other released versions or the present state of master. You can never upgrade from master or downgrade or from some other random commit-state of the source. The schema-xxxtoxxx are accompanying Upgradexxxtoxxx.java classes and schema-xxxtoxxx-cleanup scripts. The DatabaseUpgradeChecker will find which version you are at according to the db and then collect all of those three categories between then and the ersion you want to got to. Next it will first run all the schema-xxxtoxxx, then the Upgradexxxtoxxx code for migration and finally the schema-xxxtoxxx-cleanup for throwing away any old or temporary tables. And it will then add entries to the version table to indicate what just happened. I'm not sure at what stage but this is not a single transaction anyway (the cleanups are a separate single transaction) so when it fails midways, you are up for a restore and -try. regards, -- Daan Need Enterprise Grade Support for Apache CloudStack? Our CloudStack Infrastructure Support<http://shapeblue.com/cloudstack-infrastructure-support/> offers the best 24/7 SLA for CloudStack Environments. Apache CloudStack Bootcamp training courses **NEW!** CloudStack 4.2.1 training<http://shapeblue.com/cloudstack-training/> 18th-19th February 2014, Brazil. Classroom<http://shapeblue.com/cloudstack-training/> 17th-23rd March 2014, Region A. Instructor led, On-line<http://shapeblue.com/cloudstack-training/> 24th-28th March 2014, Region B. Instructor led, On-line<http://shapeblue.com/cloudstack-training/> 16th-20th June 2014, Region A. Instructor led, On-line<http://shapeblue.com/cloudstack-training/> 23rd-27th June 2014, Region B. Instructor led, On-line<http://shapeblue.com/cloudstack-training/> This email and any attachments to it may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Shape Blue Ltd or related companies. If you are not the intended recipient of this email, you must neither take any action based upon its contents, nor copy or show it to anyone. Please contact the sender if you believe you have received this email in error. Shape Blue Ltd is a company incorporated in England & Wales. ShapeBlue Services India LLP is a company incorporated in India and is operated under license from Shape Blue Ltd. Shape Blue Brasil Consultoria Ltda is a company incorporated in Brasil and is operated under license from Shape Blue Ltd. ShapeBlue is a registered trademark.