-- $Horde: kronolith/scripts/drivers/kronolith.postgres.sql,v 1.2 2003/05/22 16:39:56 chuck Exp $

CREATE TABLE kronolith_events (
    event_id BIGINT DEFAULT 0 NOT NULL,
    calendar_id VARCHAR(255) NOT NULL,
    event_creator_id VARCHAR(255) NOT NULL,
    event_description TEXT,
    event_location TEXT,
    event_keywords TEXT,
    event_exceptions TEXT,
    event_title VARCHAR(80),
    event_category VARCHAR(80),
    event_recurtype VARCHAR(11) DEFAULT '0',
    event_recurinterval VARCHAR(11),
    event_recurdays VARCHAR(11),
    event_recurenddate TIMESTAMP,
    event_start TIMESTAMP,
    event_end TIMESTAMP,
    event_alarm INT DEFAULT 0,
    event_modified INT NOT NULL,

    PRIMARY KEY (event_id)
);

CREATE INDEX kronolith_calendar_idx ON kronolith_events (calendar_id);

GRANT SELECT, INSERT, UPDATE, DELETE ON kronolith_events TO horde;
