-- $Id: device_port_log.sql,v 1.4 2003/03/21 00:40:01 max Exp $

DROP TABLE device_port_log;
DROP SEQUENCE device_port_log_id_seq;

CREATE TABLE device_port_log (
    id          serial, 
    ip          inet,
    port        text,
    reason      text,
    log         text, 
    username    text,   -- user is a reserved word
    userip      inet,
    action      text,
    creation    TIMESTAMP DEFAULT now()
                             );

CREATE INDEX idx_device_port_log_1 ON device_port_log(ip,port);
CREATE INDEX idx_device_port_log_user ON device_port_log(username);
