DB upgrades is one of the easiest things to unit test and there are previous examples of how to unit test them. Please do the unit testing before checking them in.
--Alex > -----Original Message----- > From: Sheng Yang [mailto:sh...@yasker.org] > Sent: Thursday, May 10, 2012 10:26 AM > To: cloudstack-users@incubator.apache.org > Cc: d...@soleks.com; Sheng Yang > Subject: Re: DB schema upgrade script for CS 3.0.1 -> 3.0.2, probably bug. > > Alena, > > Sorry for the commit. As you see, that one is a revert commit. Seems I've > used git revert without noticing there is another entry added. > > Would fix it by just drop the line. > > -- > regards > Yang, Sheng > > On Thu, May 10, 2012 at 10:04 AM, Alena Prokharchyk > <alena.prokharc...@citrix.com> wrote: > > On 5/10/12 10:42 AM, "d...@soleks.com" <d...@soleks.com> wrote: > > > >>Alena, > >> > >> Yup, i commented out that drop from sql script. Thanks for confirmation. > >> > >> Can you please check my post on cloudstack-dev thread about public > >>networks assigned to regular account, seems like problem still persists. > >> > >>> On 5/9/12 11:32 PM, "d...@soleks.com" <d...@soleks.com> wrote: > >>> > >>>> > >>>> > >>>> > >>>> Hi All, > >>>> I've found that DB schema upgrade script (CS 3.0.1 ---> CS 3.0.2) > >>>> is trying to drop non-existing index. Log is attached. > >>>> > >>>> Dan. > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> ---------------------------------------------------------------- > >>>> This message was sent using IMP, the Internet Messaging Program. > >>>> > >>> > >>> > >>> > >>> > >>> Sheng, this is bug introduced by your commit: > >>> > >>> 06c0fda878247020d79bb1008f8bf050070f1e73 > >>> > >>> > >>> > >>> We are trying to drop non-existing index. To be on the safe side, > >>> move this line to java code, and drop the key only when it exists. > >>> > >>> Dan, to workaround the problem on your side, do: > >>> > >>> * revert DB to your original version > >>> * comment out the line "DROP INDEX `i_host__allocation_state` ON > >>> `cloud`.`host`" in schema-301to302.sql > >>> * being on 3.0.2, start management server once again > >>> > >>> > >>> -Alena. > >>> > >>> > >>> > >> > >> > >> > >>---------------------------------------------------------------- > >>This message was sent using IMP, the Internet Messaging Program. > >> > > > > > > > > > > Dan, > > > > > > Just sent you/community the email regarding account specific public > > range problem in multiple physical networks case. > > > > -Alena. > >