SolidBase Support for Downgrading at multiple levels

27 views
Skip to first unread message

Arvind Kumar

unread,
May 18, 2012, 3:57:36 AM5/18/12
to SolidBase User
Hi Rene,

I'm using Solidbase for database versioning. It is really a wonderful
tool. But I have a requirement where is fails, though I manged to fix
it after downloading the source code.

I would like to share the same with you so that you can fix that in
existing 2.0.0-beta1.

The requirement is like this: User at anytime should be able to
downgrade or update his database to any version (not necessarily to
Switch branch).

Lets say Initial version was 1.0.1. During the course of time db has
gone to multiple up-gradations.
Say
--* DEFINITION
--* SETUP "" --> "1.1"
--* UPGRADE "" --> "1.0.1"
--* UPGRADE "1.0.1" --> "1.0.2"
--* DOWNGRADE "1.0.2" --> "1.0.1"
--* UPGRADE "1.0.2" --> "1.0.3"
--* DOWNGRADE "1.0.3" --> "1.0.2"
--* UPGRADE "1.0.3" --> "1.0.4"
--* DOWNGRADE "1.0.4" --> "1.0.3"
--* /DEFINITION

Now current version is 1.0.4 & If user wants to downgrade to 1.0.2
version he should be able to do that by just specifying the target as
1.0.2 in pom.xml

As off now it throws an exception, "Expecting not more than 1 record
to be updated, not 2"

The reason is DBVersion.java line no. 662 has as assert statement
Assert.isTrue( modified <= 1, "Expecting not more than 1 record to be
updated, not " + modified );

Can it be possible for you to comment this statement & release a new
version?

Thanks
Arvind Kumar


René de Bloois

unread,
May 18, 2012, 7:52:02 AM5/18/12
to solidba...@googlegroups.com
Arvind,

Yes, that looks like a bug. I'll work on that tonight.
I understand that you were able to build a new version of SolidBase yourself. That gives me more time to analyse the problem.

Currently, to build SolidBase you need the SolidStack project too.

Regards,
René

Arvind Kumar

unread,
May 21, 2012, 12:49:36 AM5/21/12
to SolidBase User
Hi Rene,

Thanks for taking this up. Yes I was able to download solidstack
myself & build both solidbase & solidstack.

The problem is solved for me but I would like you to address it at
your end so that we can use the released version of solidbase.

Please let us know when the new release is ready.

THanks
Arvind Kumar

René de Bloois

unread,
May 21, 2012, 7:27:17 AM5/21/12
to solidba...@googlegroups.com
Arvind,

Yes, I fixed it. I'll release it to the maven repo tonight.
It could be that you have to recreate your database from scratch, because I made changes in how 'downgrade' modifies the data in the DBVERSIONLOG table.

I kept the assertion. It has proven its value :-)

Regards,
René

René de Bloois

unread,
May 21, 2012, 3:13:23 PM5/21/12
to solidba...@googlegroups.com
Arvind,

I have released 2.0.0-beta2 to the Maven repository. You can also download it from:


It could be that you have to recreate your database from scratch, because I made changes in how 'downgrade' modifies the data in the DBVERSIONLOG table.

Regards,
René

Reply all
Reply to author
Forward
0 new messages