Hi,
I'm using Sybase 11.0.3 database, which Sybase gave to Linux community for free
development and deployment. I thought to share my database setup with you (should you
want to add it to cfg file)
I started with mssql setup (since it is essentially sybase), removed "["'s and fixed
some record sizes. Syb doesn't support indexes larger then 255 hence message_name &
repository_name change ... why were they so large anyway i wander ...
<sql name="createTable" db="mssql">
CREATE TABLE ${table} (
message_name varchar (120) NOT NULL,
repository_name varchar (120) NOT NULL,
message_state varchar (30) NOT NULL ,
error_message varchar (255) NULL ,
sender varchar (200) NULL ,
recipients text NOT NULL ,
remote_host varchar (100) NOT NULL ,
remote_addr varchar (20) NOT NULL ,
message_body image NOT NULL ,
last_updated datetime NOT NULL
)
ALTER TABLE ${table} ADD
CONSTRAINT PK_${table} PRIMARY KEY
(
message_name,
repository_name
)
</sql>
One more change is required
<sql name="createTable" db="mssql">CREATE TABLE ${table} (uniqueId UNIQUEIDE
NTIFIER, username VARCHAR(50) NOT NULL, pwdHash VARCHAR(50), pwdAlgorithm VARCHA
R(20), useForwarding SMALLINT, forwardDestination VARCHAR(250) NULL, useAlias SM
ALLINT, alias VARCHAR(250), PRIMARY KEY(username))</sql>
forwardDestination has to be NULL because when user is created it puts NULL there ...
whether it should be so or I just "fixed" it, that remains the question. However
explicit declarations are good things when trying to support different databases that
can default to NULL or NOT NULL arbitrarily.
and that should do it ...
-d-