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 oracle.sql
Date Wed, 12 May 2004 14:57:33 GMT
ceki        2004/05/12 07:57:33

  Modified:    src/java/org/apache/log4j/db/dialect oracle.sql
  Log:
  Changes based input by by James Stauffer ( jstauffe at spscommerc zzot com)
  
  Revision  Changes    Path
  1.6       +27 -22    logging-log4j/src/java/org/apache/log4j/db/dialect/oracle.sql
  
  Index: oracle.sql
  ===================================================================
  RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/db/dialect/oracle.sql,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- oracle.sql	10 May 2004 17:26:58 -0000	1.5
  +++ oracle.sql	12 May 2004 14:57:33 -0000	1.6
  @@ -1,27 +1,31 @@
  -# This SQL script creates the required tables by org.apache.log4j.db.DBAppender and 
  -# org.apache.log4j.db.DBReceiver.
  -#
  -# It is intended for Oracle databases.
  -
  -# WARNING WARNING WARNING 
  -# The following SQL script is untested in the sense that it has not
  -# been executed against an Oracle database. Thus, it can contain typos
  -# or may even contain incorrect SQL statements.
  +-- This SQL script creates the required tables by org.apache.log4j.db.DBAppender and 
  +-- org.apache.log4j.db.DBReceiver.
  +--
  +-- It is intended for Oracle databases.
  +
  +
  +-- The following lines are useful in cleaning any previous tables 
  +
  +--drop TRIGGER logging_event_id_seq_trig; 
  +--drop SEQUENCE logging_event_id_seq; 
  +--drop table logging_event_property; 
  +--drop table logging_event_exception; 
  +--drop table logging_event; 
   
   
   CREATE SEQUENCE logging_event_id_seq MINVALUE 1 START WITH 1;
   
   CREATE TABLE logging_event 
     (
  -    sequence_number   BIGINT NOT NULL,
  -    timestamp         BIGINT NOT NULL,
  -    rendered_message  TEXT NOT NULL,
  -    logger_name       VARCHAR(254) NOT NULL,
  -    level_string      VARCHAR(254) NOT NULL,
  -    ndc               TEXT,
  -    thread_name       VARCHAR(254),
  +    sequence_number   NUMBER(20) NOT NULL,
  +    timestamp         NUMBER(20) NOT NULL,
  +    rendered_message  VARCHAR2(4000) NOT NULL,
  +    logger_name       VARCHAR2(254) NOT NULL,
  +    level_string      VARCHAR2(254) NOT NULL,
  +    ndc               VARCHAR2(4000),
  +    thread_name       VARCHAR2(254),
       reference_flag    SMALLINT,
  -    id                INT PRIMARY KEY
  +    event_id          INT PRIMARY KEY
     );
   
   CREATE TRIGGER logging_event_id_seq_trig
  @@ -32,23 +36,24 @@
       INTO   :NEW.id 
       FROM   DUAL;  
     END logging_event_id_seq_trig;
  +/
   
   CREATE TABLE logging_event_property
     (
       event_id	      INT NOT NULL,
  -    mapped_key        VARCHAR(254) NOT NULL,
  -    mapped_value      VARCHAR(254),
  +    mapped_key        VARCHAR2(254) NOT NULL,
  +    mapped_value      VARCHAR2(254),
       PRIMARY KEY(event_id, mapped_key),
  -    FOREIGN KEY (event_id) REFERENCES logging_event(id)
  +    FOREIGN KEY (event_id) REFERENCES logging_event(event_id)
     );
     
   CREATE TABLE logging_event_exception
     (
       event_id         INT NOT NULL,
       i                SMALLINT NOT NULL,
  -    trace_line       VARCHAR(254) NOT NULL,
  +    trace_line       VARCHAR2(254) NOT NULL,
       PRIMARY KEY(event_id, i),
  -    FOREIGN KEY (event_id) REFERENCES logging_event(id)
  +    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