Can solidbase manage multiple files

33 views
Skip to first unread message

Martin

unread,
Apr 4, 2012, 9:51:27 AM4/4/12
to SolidBase User
I have an existing db update structure with a number of files from
different releases (1.1.x, 1.2.x, etc...) which is done for making it
easier for developers to view/manage. I was considering adding the
solidbase syntax but didn't know if it could load from multiple sql
files.

Thanks,

Martin

René de Bloois

unread,
Apr 5, 2012, 2:01:50 PM4/5/12
to SolidBase User
Martin,

I am sorry to say that with the 1.6 version it is not possible to
split your upgrade file into separate files. With the new 2.0 version
that I am working on it is possible however.

There is a certain philosophy behind this. I am convinced that a
database upgrade should be maintained by one or two central members
from the team rather than everybody hacking in it. That is to keep a
high quality database, where things like naming conventions, indexes,
schemas, table and column names are consistent. For these central team
members a single upgrade file is easy to maintain, for the most
important part because you would mostly add you database changes to
the end of the file. This does not mean that nobody is allowed to
create the SQL for the change they need, it just that they should let
it be reviewed early, especially with respect to the names of the
things they create. Later on, the central team members will add it to
the official upgrade file and a second quality check is done while
doing that.

When you are doing branches (be it stable release branches or
development/feature branches or even forks) you can't expect everybody
on your team to understand what is going on. This is not caused by
SolidBase of course, but because database version management is a
difficult problem of itself.

On the other hand, I knew people might still want this, even I might
see some need for it, which is why I implemented it in the new
upcoming 2.0 version of SolidBase.

Here is an example from the unit tests from SolidBase 2.0:

--* DEFINITION
--* SETUP "" --> "1.1"
--* UPGRADE "" --> "1.0.1"
--* /DEFINITION

--* SETUP "" --> "1.1"
CREATE TABLE DBVERSION ( VERSION VARCHAR(20), TARGET VARCHAR(20),
STATEMENTS INTEGER NOT NULL, SPEC VARCHAR(5) NOT NULL );
CREATE TABLE DBVERSIONLOG ( TYPE VARCHAR(1) NOT NULL, SOURCE
VARCHAR(20), TARGET VARCHAR(20) NOT NULL, STATEMENT INTEGER NOT NULL,
STAMP TIMESTAMP NOT NULL, COMMAND VARCHAR(4000), RESULT
VARCHAR(4000) );
--* /SETUP

--* UPGRADE "" --> "1.0.1"

--* INCLUDE "testpatch-included1.sql"

--* SECTION "Inserting admin user"
INSERT INTO USERS ( USER_USERNAME, USER_PASSWORD ) VALUES ( 'admin',
'secret' );

--* /UPGRADE

And the included file:

--* SECTION "Creating table USERS"
CREATE TABLE USERS
(
USER_ID INT IDENTITY,
USER_USERNAME VARCHAR(40) NOT NULL,
USER_PASSWORD VARCHAR(40) NOT NULL
);


If you want to, you can use a beta version. You can let me know if you
want that, then I'll build an official 2.0.0-beta1 version.

Regards,

René

Ajay Sharma

unread,
May 11, 2012, 5:58:39 AM5/11/12
to SolidBase User
Hi Rene,

Could u share official 2.0.0-beta1 version.I need multiple files
Options.

Thanks
Ajay
> > Martin- Hide quoted text -
>
> - Show quoted text -

René de Bloois

unread,
May 11, 2012, 6:53:58 AM5/11/12
to solidba...@googlegroups.com
Ajay,

I will build one this weekend if that is soon enough for you. If you want it sooner, let me know, then I'll try to build one tonight.

René

Ajay Sharma

unread,
May 11, 2012, 7:42:01 AM5/11/12
to SolidBase User
Hi Rene,

It will be gr8 if you can provide ASAP.:)

Thanks
Ajay
> > > - Show quoted text -- Hide quoted text -

Ajay Sharma

unread,
May 11, 2012, 9:12:40 AM5/11/12
to SolidBase User
Hi Rene,

It will be possible for you today itself ?

I am waiting for your reply.

Thanks
Ajay

René de Bloois

unread,
May 11, 2012, 9:19:58 AM5/11/12
to solidba...@googlegroups.com
Ajay,

I'll try my best to do it before 23h00. It's know past 15h00.
What's your local time?

René

René de Bloois

unread,
May 11, 2012, 3:05:42 PM5/11/12
to solidba...@googlegroups.com
Ajay,

Version 2.0.0-beta1 has been released to the Maven repository. You can also download it with the following link:


René

Ajay Sharma

unread,
May 15, 2012, 12:26:07 AM5/15/12
to SolidBase User
Hi Rene,

I have tested multiple file support and it seems its working fine.
Thanks for the help.Its really very nice tool for the DB version.

Ajay




On May 12, 12:05 am, René de Bloois <rene.de.blo...@gmail.com> wrote:
> Ajay,
>
> Version 2.0.0-beta1 has been released to the Maven repository. You can also
> download it with the following link:
>
> http://solidbase.googlecode.com/svn/repository/solidbase/solidbase/2....
Reply all
Reply to author
Forward
0 new messages