[logback-dev] svn commit: r1019 - logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/db/dialect

noreply.seb at qos.ch noreply.seb at qos.ch
Tue Nov 28 17:41:06 CET 2006


Author: seb
Date: Tue Nov 28 17:41:06 2006
New Revision: 1019

Modified:
   logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/db/dialect/mysql.sql
   logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/db/dialect/postgresql.sql

Log:
end of script moving around

Modified: logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/db/dialect/mysql.sql
==============================================================================
--- logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/db/dialect/mysql.sql	(original)
+++ logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/db/dialect/mysql.sql	Tue Nov 28 17:41:06 2006
@@ -1,38 +1,51 @@
-# This SQL script creates the required tables by ch.qos.logback.access.db.DBAppender.
+# This SQL script creates the required tables by ch.qos.logback.classic.db.DBAppender.
 #
 # It is intended for MySQL databases. It has been tested on MySQL 5.0.22 with 
 # INNODB tables.
 
 
 BEGIN;
-DROP TABLE IF EXISTS access_event_header;
-DROP TABLE IF EXISTS access_event;
+DROP TABLE IF EXISTS logging_event_property;
+DROP TABLE IF EXISTS logging_event_exception;
+DROP TABLE IF EXISTS logging_event;
 COMMIT;
 
+
 BEGIN;
-CREATE TABLE access_event 
+CREATE TABLE logging_event 
   (
-    timestmp          BIGINT NOT NULL,
-   	requestURI        VARCHAR(254),
-    requestURL        VARCHAR(254),
-    remoteHost        VARCHAR(254),
-    remoteUser        VARCHAR(254),
-    remoteAddr        VARCHAR(254),
-    protocol          VARCHAR(254),
-    method            VARCHAR(254),
-    serverName        VARCHAR(254),
-    postContent       VARCHAR(254),
+    timestmp         BIGINT NOT NULL,
+   	formatted_message  TEXT NOT NULL,
+    logger_name       VARCHAR(254) NOT NULL,
+    level_string      VARCHAR(254) NOT NULL,
+    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          INT NOT NULL AUTO_INCREMENT PRIMARY KEY
   );
 COMMIT;
 
 BEGIN;
-CREATE TABLE access_event_header
+CREATE TABLE logging_event_property
   (
     event_id	      INT NOT NULL,
-    header_key        VARCHAR(254) NOT NULL,
-    header_value      TEXT,
-    PRIMARY KEY(event_id, header_key),
-    FOREIGN KEY (event_id) REFERENCES access_event(event_id)
+    mapped_key        VARCHAR(254) NOT NULL,
+    mapped_value      TEXT,
+    PRIMARY KEY(event_id, mapped_key),
+    FOREIGN KEY (event_id) REFERENCES logging_event(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(event_id)
   );
 COMMIT;
\ No newline at end of file

Modified: logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/db/dialect/postgresql.sql
==============================================================================
--- logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/db/dialect/postgresql.sql	(original)
+++ logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/db/dialect/postgresql.sql	Tue Nov 28 17:41:06 2006
@@ -2,32 +2,44 @@
 #
 # It is intended for PostgreSQL databases.
 
-DROP TABLE    access_event_exception;
-DROP SEQUENCE access_event_id_seq;
-DROP TABLE    access_event;
+DROP TABLE    logging_event_property;
+DROP TABLE    logging_event_exception;
+DROP SEQUENCE logging_event_id_seq;
+DROP TABLE    logging_event;
 
-CREATE SEQUENCE access_event_id_seq MINVALUE 1 START 1;
 
-CREATE TABLE access_event 
+CREATE SEQUENCE logging_event_id_seq MINVALUE 1 START 1;
+
+
+CREATE TABLE logging_event 
   (
-    timestmp          BIGINT NOT NULL,
-   	requestURI        VARCHAR(254),
-    requestURL        VARCHAR(254),
-    remoteHost        VARCHAR(254),
-    remoteUser        VARCHAR(254),
-    remoteAddr        VARCHAR(254),
-    protocol          VARCHAR(254),
-    method            VARCHAR(254),
-    serverName        VARCHAR(254),
-    postContent       VARCHAR(254),
-    event_id          INT DEFAULT nextval('access_event_id_seq') PRIMARY KEY
+    timestmp         BIGINT NOT NULL,
+   	formatted_message  TEXT NOT NULL,
+    logger_name       VARCHAR(254) NOT NULL,
+    level_string      VARCHAR(254) NOT NULL,
+    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          INT DEFAULT nextval('logging_event_id_seq') PRIMARY KEY
   );
 
-CREATE TABLE access_event_header  
-(
+CREATE TABLE logging_event_property
+  (
     event_id	      INT NOT NULL,
-    header_key        VARCHAR(254) NOT NULL,
-    header_value      VARCHAR(1024),
-    PRIMARY KEY(event_id, header_key),
-    FOREIGN KEY (event_id) REFERENCES access_event(event_id)
-  );
\ No newline at end of file
+    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         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(event_id)
+  );



More information about the logback-dev mailing list