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

noreply.seb at qos.ch noreply.seb at qos.ch
Tue Nov 28 17:39:49 CET 2006


Author: seb
Date: Tue Nov 28 17:39:49 2006
New Revision: 1018

Added:
   logback/trunk/logback-access/src/main/java/ch/qos/logback/access/db/dialect/postgresql.sql

Log:


Added: logback/trunk/logback-access/src/main/java/ch/qos/logback/access/db/dialect/postgresql.sql
==============================================================================
--- (empty file)
+++ logback/trunk/logback-access/src/main/java/ch/qos/logback/access/db/dialect/postgresql.sql	Tue Nov 28 17:39:49 2006
@@ -0,0 +1,33 @@
+# This SQL script creates the required tables by ch.qos.logback.classic.db.DBAppender
+#
+# It is intended for PostgreSQL databases.
+
+DROP TABLE    access_event_exception;
+DROP SEQUENCE access_event_id_seq;
+DROP TABLE    access_event;
+
+CREATE SEQUENCE access_event_id_seq MINVALUE 1 START 1;
+
+CREATE TABLE access_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
+  );
+
+CREATE TABLE access_event_header  
+(
+    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



More information about the logback-dev mailing list