From d28d39cabd55b3de3258dabd3fbefe1976dc1bc1 Mon Sep 17 00:00:00 2001
From: David Sommerseth <dazo@users.sourceforge.net>
Date: Fri, 19 Sep 2008 14:25:08 +0200
Subject: Added (untested) logging of time_duration into
 openvpn_lastlog.session_duration

---
 database/sqlite/sql-schema.sql | 33 +++++++++++++++++----------------
 1 file changed, 17 insertions(+), 16 deletions(-)

(limited to 'database/sqlite/sql-schema.sql')

diff --git a/database/sqlite/sql-schema.sql b/database/sqlite/sql-schema.sql
index 5cdb77b..490669d 100644
--- a/database/sqlite/sql-schema.sql
+++ b/database/sqlite/sql-schema.sql
@@ -36,22 +36,23 @@ CREATE TABLE openvpn_accesses (
 );
 
 CREATE TABLE openvpn_lastlog (
-       uid            integer      ,
-       certid         integer      ,
-       protocol       varchar(4)   NOT NULL,
-       remotehost     varchar(128) NOT NULL,
-       remoteport     integer      NOT NULL,
-       macaddr        varchar(20)  ,
-       vpnipaddr      varchar(32)  NOT NULL,
-       vpnipmask      varchar(32)  NOT NULL,
-       sessionstatus  integer      NOT NULL DEFAULT 0,
-       sessionkey     varchar(128) ,
-       login          timestamp    ,
-       logout         timestamp    ,
-       session_del    timestamp    ,
-       bytes_sent     integer      ,
-       bytes_received integer      ,
-       llid           integer      PRIMARY KEY AUTOINCREMENT
+       uid              integer      ,
+       certid           integer      ,
+       protocol         varchar(4)   NOT NULL,
+       remotehost       varchar(128) NOT NULL,
+       remoteport       integer      NOT NULL,
+       macaddr          varchar(20)  ,
+       vpnipaddr        varchar(32)  NOT NULL,
+       vpnipmask        varchar(32)  NOT NULL,
+       sessionstatus    integer      NOT NULL DEFAULT 0,
+       sessionkey       varchar(128) ,
+       login            timestamp    ,
+       logout           timestamp    ,
+       session_del      timestamp    ,
+       session_duration timestamp,
+       bytes_sent       integer      ,
+       bytes_received   integer      ,
+       llid             integer      PRIMARY KEY AUTOINCREMENT
 );
 CREATE UNIQUE INDEX openvpn_lastlog_sessionkey ON openvpn_lastlog(sessionkey);
 
-- 
cgit 

