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é