
CREATE TABLE FAIRDBLOGENTRYVAL(
    SEQNO         INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
    TIMESTART     DATETIME NOT NULL,
    TIMEEND       DATETIME NOT NULL,
    DETID         TINYINT,
    DATAID        TINYINT,
    VERSION       INT,
    COMPOSITEID   INT,
    TIMEINCR      DATETIME NOT NULL,
    TIMETRANS     DATETIME NOT NULL
);

CREATE TABLE FAIRDBLOGENTRY(
    SEQNO             INT,
    ROW_ID            INT,
    TABLENAME         TEXT,
    MIN_SEQNO         INT NOT NULL,
    MAX_SEQNO         INT NOT NULL,
    N_SEQNO           INT NOT NULL,
    USERNAME          TEXT,
    PROCESS_ID        TEXT,
    HOSTNAME          TEXT,
    SERVERNAME        TEXT,
    LOG_TITLE         TEXT
 );


CREATE TABLE FAIRDBGLOBALSEQNO(
    TABLENAME      CHAR(64) NOT NULL PRIMARY KEY,
    LASTUSEDSEQNO  INT );
INSERT INTO FAIRDBGLOBALSEQNO VALUES ('*',900000000);


