logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject cvs commit: logging-log4j/src/java/org/apache/log4j/db/dialect db2.sql
Date Mon, 31 May 2004 21:31:08 GMT
ceki        2004/05/31 14:31:08

  Added:       src/java/org/apache/log4j/db/dialect db2.sql
  Log:
  Table creation script for DB2.
  
  Revision  Changes    Path
  1.1                  logging-log4j/src/java/org/apache/log4j/db/dialect/db2.sql
  
  Index: db2.sql
  ===================================================================
  # This SQL script creates the required tables by org.apache.log4j.db.DBAppender and 
  # org.apache.log4j.db.DBReceiver.
  #
  # It is intended for IBM DB2 databases.
  #
  # WARNING  WARNING WARNING  WARNING 
  # =================================
  # This SQL script has not been tested on an actual DB2
  # instance. It may contain errors or even invalid SQL
  # statements.
  
  DROP TABLE  logging_event_property;
  DROP TABLE  logging_event_exception;
  DROP TABLE  logging_event;
  
  CREATE TABLE logging_event 
    (
      sequence_number   BIGINT NOT NULL,
      timestamp         BIGINT NOT NULL,
      rendered_message  VARCHAR(4000) NOT NULL,
      logger_name       VARCHAR(254) NOT NULL,
      level_string      VARCHAR(254) NOT NULL,
      ndc               VARCHAR(4000),
      thread_name       VARCHAR(254),
      reference_flag    SMALLINT,
      caller_filename   VARCHAR(254) NOT NULL,
      caller_class      VARCHAR(254) NOT NULL,
      caller_method     VARCHAR(254) NOT NULL,
      caller_line       CHAR(4) NOT NULL,
      event_id          INTEGER GENERATED ALWAYS AS IDENTITY (START WITH 1)
    );
  
  CREATE TABLE logging_event_property
    (
      event_id	      INTEGER NOT NULL,
      mapped_key        VARCHAR(254) NOT NULL,
      mapped_value      VARCHAR(1024),
      PRIMARY KEY(event_id, mapped_key),
      FOREIGN KEY (event_id) REFERENCES logging_event(event_id)
    );
  
  CREATE TABLE logging_event_exception
    (
      event_id         INTEGER NOT NULL,
      i                SMALLINT NOT NULL,
      trace_line       VARCHAR(254) NOT NULL,
      PRIMARY KEY(event_id, i),
      FOREIGN KEY (event_id) REFERENCES logging_event(event_id)
    );
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message