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

  Modified:    src/java/org/apache/log4j/db/dialect postgresql.sql
                        mysql.sql oracle.sql
  Log:
  *** keyword substitution change ***
  
  Revision  Changes    Path
  1.6       +42 -42    logging-log4j/src/java/org/apache/log4j/db/dialect/postgresql.sql
  
  Index: postgresql.sql
  ===================================================================
  RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/db/dialect/postgresql.sql,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- postgresql.sql	12 May 2004 13:21:41 -0000	1.5
  +++ postgresql.sql	12 May 2004 14:59:53 -0000	1.6
  @@ -1,42 +1,42 @@
  -# This SQL script creates the required tables by org.apache.log4j.db.DBAppender and 
  -# org.apache.log4j.db.DBReceiver.
  -#
  -# It is intended for PostgreSQL databases.
  -
  -DROP TABLE    mdc;
  -DROP TABLE    logging_event;
  -DROP SEQUENCE logging_event_id_seq;
  -
  -CREATE SEQUENCE logging_event_id_seq MINVALUE 1 START 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),
  -    reference_flag    SMALLINT,
  -    event_id          INT DEFAULT nextval('logging_event_id_seq') PRIMARY KEY
  -  );
  -
  -CREATE TABLE logging_event_property
  -  (
  -    event_id	      INT NOT NULL,
  -    mapped_key        VARCHAR(254) NOT NULL,
  -    mapped_value      VARCHAR(254),
  -    PRIMARY KEY(event_id, mapped_key),
  -    FOREIGN KEY (event_id) REFERENCES logging_event(id)
  -  );
  -
  -CREATE TABLE logging_event_exception
  -  (
  -    event_id         INT NOT NULL,
  -    i                SMALLINT NOT NULL,
  -    trace_line       VARCHAR(254) NOT NULL,
  -    PRIMARY KEY(event_id, i),
  -    FOREIGN KEY (event_id) REFERENCES logging_event(id)
  -  );
  +# This SQL script creates the required tables by org.apache.log4j.db.DBAppender and 
  +# org.apache.log4j.db.DBReceiver.
  +#
  +# It is intended for PostgreSQL databases.
  +
  +DROP TABLE    mdc;
  +DROP TABLE    logging_event;
  +DROP SEQUENCE logging_event_id_seq;
  +
  +CREATE SEQUENCE logging_event_id_seq MINVALUE 1 START 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),
  +    reference_flag    SMALLINT,
  +    event_id          INT DEFAULT nextval('logging_event_id_seq') PRIMARY KEY
  +  );
  +
  +CREATE TABLE logging_event_property
  +  (
  +    event_id	      INT NOT NULL,
  +    mapped_key        VARCHAR(254) NOT NULL,
  +    mapped_value      VARCHAR(254),
  +    PRIMARY KEY(event_id, mapped_key),
  +    FOREIGN KEY (event_id) REFERENCES logging_event(id)
  +  );
  +
  +CREATE TABLE logging_event_exception
  +  (
  +    event_id         INT NOT NULL,
  +    i                SMALLINT NOT NULL,
  +    trace_line       VARCHAR(254) NOT NULL,
  +    PRIMARY KEY(event_id, i),
  +    FOREIGN KEY (event_id) REFERENCES logging_event(id)
  +  );
  
  
  
  1.6       +49 -49    logging-log4j/src/java/org/apache/log4j/db/dialect/mysql.sql
  
  Index: mysql.sql
  ===================================================================
  RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/db/dialect/mysql.sql,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- mysql.sql	12 May 2004 13:21:41 -0000	1.5
  +++ mysql.sql	12 May 2004 14:59:53 -0000	1.6
  @@ -1,50 +1,50 @@
  -# This SQL script creates the required tables by org.apache.log4j.db.DBAppender and 
  -# org.apache.log4j.db.DBReceiver.
  -#
  -# It is intended for MySQL databases. It has been tested on MySQL 4.1.1 with 
  -# INNODB tables.
  -
  -
  -BEGIN;
  -DROP TABLE IF EXISTS logging_event;
  -DROP TABLE IF EXISTS logging_event_property;
  -DROP TABLE IF EXISTS logging_event_exception;
  -COMMIT;
  -
  -
  -BEGIN;
  -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),
  -    reference_flag    SMALLINT,
  -    event_id          INT NOT NULL AUTO_INCREMENT PRIMARY KEY
  -  );
  -COMMIT;
  -
  -BEGIN;
  -CREATE TABLE logging_event_property
  -  (
  -    event_id	      INT NOT NULL,
  -    mapped_key        VARCHAR(254) NOT NULL,
  -    mapped_value      VARCHAR(254),
  -    PRIMARY KEY(event_id, mapped_key),
  -    FOREIGN KEY (event_id) REFERENCES logging_event(id)
  -  );
  -COMMIT;
  -
  -BEGIN;
  -CREATE TABLE logging_event_exception
  -  (
  -    event_id         INT NOT NULL,
  -    i                SMALLINT NOT NULL,
  -    trace_line       VARCHAR(254) NOT NULL,
  -    PRIMARY KEY(event_id, i),
  -    FOREIGN KEY (event_id) REFERENCES logging_event(id)
  -  );
  +# This SQL script creates the required tables by org.apache.log4j.db.DBAppender and 
  +# org.apache.log4j.db.DBReceiver.
  +#
  +# It is intended for MySQL databases. It has been tested on MySQL 4.1.1 with 
  +# INNODB tables.
  +
  +
  +BEGIN;
  +DROP TABLE IF EXISTS logging_event;
  +DROP TABLE IF EXISTS logging_event_property;
  +DROP TABLE IF EXISTS logging_event_exception;
  +COMMIT;
  +
  +
  +BEGIN;
  +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),
  +    reference_flag    SMALLINT,
  +    event_id          INT NOT NULL AUTO_INCREMENT PRIMARY KEY
  +  );
  +COMMIT;
  +
  +BEGIN;
  +CREATE TABLE logging_event_property
  +  (
  +    event_id	      INT NOT NULL,
  +    mapped_key        VARCHAR(254) NOT NULL,
  +    mapped_value      VARCHAR(254),
  +    PRIMARY KEY(event_id, mapped_key),
  +    FOREIGN KEY (event_id) REFERENCES logging_event(id)
  +  );
  +COMMIT;
  +
  +BEGIN;
  +CREATE TABLE logging_event_exception
  +  (
  +    event_id         INT NOT NULL,
  +    i                SMALLINT NOT NULL,
  +    trace_line       VARCHAR(254) NOT NULL,
  +    PRIMARY KEY(event_id, i),
  +    FOREIGN KEY (event_id) REFERENCES logging_event(id)
  +  );
   COMMIT;
  
  
  
  1.7       +61 -61    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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- oracle.sql	12 May 2004 14:57:33 -0000	1.6
  +++ oracle.sql	12 May 2004 14:59:53 -0000	1.7
  @@ -1,61 +1,61 @@
  --- 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   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,
  -    event_id          INT PRIMARY KEY
  -  );
  -
  -CREATE TRIGGER logging_event_id_seq_trig
  -  BEFORE INSERT ON logging_event
  -  FOR EACH ROW  
  -  BEGIN  
  -    SELECT logging_event_id_seq.NEXTVAL 
  -    INTO   :NEW.id 
  -    FROM   DUAL;  
  -  END logging_event_id_seq_trig;
  -/
  -
  -CREATE TABLE logging_event_property
  -  (
  -    event_id	      INT NOT NULL,
  -    mapped_key        VARCHAR2(254) NOT NULL,
  -    mapped_value      VARCHAR2(254),
  -    PRIMARY KEY(event_id, mapped_key),
  -    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       VARCHAR2(254) NOT NULL,
  -    PRIMARY KEY(event_id, i),
  -    FOREIGN KEY (event_id) REFERENCES logging_event(event_id)
  -  );
  -  
  -
  -
  -
  +-- 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   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,
  +    event_id          INT PRIMARY KEY
  +  );
  +
  +CREATE TRIGGER logging_event_id_seq_trig
  +  BEFORE INSERT ON logging_event
  +  FOR EACH ROW  
  +  BEGIN  
  +    SELECT logging_event_id_seq.NEXTVAL 
  +    INTO   :NEW.id 
  +    FROM   DUAL;  
  +  END logging_event_id_seq_trig;
  +/
  +
  +CREATE TABLE logging_event_property
  +  (
  +    event_id	      INT NOT NULL,
  +    mapped_key        VARCHAR2(254) NOT NULL,
  +    mapped_value      VARCHAR2(254),
  +    PRIMARY KEY(event_id, mapped_key),
  +    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       VARCHAR2(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