Subject Re: Jaybird Error (JBird 2.01, Firebird 2RC1
Author Ian A. Newby
Hi Roman,

Heres the definitions you wanted.
There are some triggers but if I do the same statement in IBExpert it
works so I'm assuming the triggers are OK.

Regards
Ian.


/******************************************************************************/
/**** Domains
****/
/******************************************************************************/

CREATE DOMAIN D_CONTENT_TYPE AS
CHAR(2);

CREATE DOMAIN D_DEPTH AS
SMALLINT;

CREATE DOMAIN D_DISPLAY_MODE AS
CHAR(1);

CREATE DOMAIN D_HTML AS
BLOB SUB_TYPE 1 SEGMENT SIZE 2048;

CREATE DOMAIN D_LONG_DESC AS
VARCHAR(200);

CREATE DOMAIN D_META_DESC AS
VARCHAR(1024);

CREATE DOMAIN D_META_KEYWORDS AS
VARCHAR(1024);

CREATE DOMAIN D_NOW AS
TIMESTAMP
DEFAULT 'NOW';

CREATE DOMAIN D_PHRASE AS
VARCHAR(100);

CREATE DOMAIN D_RECORD_ID AS
BIGINT
NOT NULL;

CREATE DOMAIN D_SCORE AS
SMALLINT;

CREATE DOMAIN D_SINGLE_WORD AS
VARCHAR(30);

CREATE DOMAIN D_SORT_ID AS
SMALLINT;

CREATE DOMAIN D_TIMESTAMP AS
TIMESTAMP;

CREATE DOMAIN D_UUID AS
CHAR(22);

CREATE DOMAIN D_VERSION AS
NUMERIC(9,2)
DEFAULT 1
NOT NULL;

/******************************************************************************/
/**** Tables
****/
/******************************************************************************/

CREATE TABLE CONTENT (
PGE_ID D_UUID NOT NULL,
PGE_VERSION D_VERSION NOT NULL,
PGE_PARENT_ID D_UUID,
PGE_TITLE D_LONG_DESC,
PGE_KEYWORDS D_META_KEYWORDS,
PGE_DESCRIPTION D_META_DESC,
PGE_UPDATED D_NOW,
PGE_CONTENT_TYPE D_CONTENT_TYPE,
PGE_HEADER D_HTML,
PGE_DETAIL D_HTML,
PGE_INDEXED D_TIMESTAMP,
SF_ID D_UUID,
PGE_DEPTH D_DEPTH,
PGE_BREADCRUMB D_LONG_DESC,
PGE_ORDERING D_SORT_ID,
PGE_DISPLAY_MODE D_DISPLAY_MODE DEFAULT 'H',
PGE_RESTRICT_READ D_UUID,
PGE_RESTRICT_EDIT D_UUID,
PGE_ORIGINAL D_UUID,
PGE_REF D_RECORD_ID,
PGE_URL COMPUTED BY ('/' || PGE_CONTENT_TYPE || '/' ||
PGE_REF || '/index.html')
);