On the first startup of the Store, it will attempt to automatically
create the appropriate tables in the database. The creation will fail
if any of the types used is not supported by the user's database, in
which case the tables have to be created before starting the store.
This document includes a number of SQL scripts which can be used with
various databases to create the tables. Contributions are welcome :)
Note: The JDBC store's goal is to be as compatible as possible.
Specific, high performance stores will eventually be developed, based
around some vendor XA driver.
The initialization script for hSQL is the one which is run at the
startup of the store.
create table objects(uri varchar(65536) primary key, classname varchar(4096);
create table children(uri varchar(65536), childuri varchar(65536));
create table links(link varchar(65536), linkto varchar(65536));
create table permissions(object varchar(65536), subject varchar(65536), \
action varchar(65536), inheritable int, negative int);
create table locks(id varchar(65536), object varchar(4096), \
subject varchar(4096), type varchar(4096), \
expirationdate varchar(15), inheritable int, xexclusive int);
create table revisions(uri varchar(65536) primary key, \
isversioned int, initialrevision varchar(10));
create table workingrevision(uri varchar(65536), \
baserevision varchar(20), xnumber varchar(20));
create table latestrevisions(uri varchar(65536), \
branchname varchar(4096), xnumber varchar(20));
create table branches(uri varchar(65536), xnumber varchar(20), \
childnumber varchar(20));
create table revision(uri varchar(65536), xnumber varchar(20), \
branchname varchar(4096));
create table label(uri varchar(65536), xnumber varchar(20), \
label varchar(4096));
create table property(uri varchar(65536), xnumber varchar(20), \
name varchar(4096), value varchar(65536), namespace varchar(4096), \
type varchar(100), protected int);
create table revisioncontent(uri varchar(65536), xnumber varchar(20), \
content longvarbinary);