/* * Description: * This file is used to create all tables used by WebCalendar and * initialize some of those tables with the required data. * * The comments in the table definitions will be parsed to * generate a document (in HTML) that describes these tables. * * History: * 21-Oct-2002 Added this file header and additional comments * below. */ /* * Defines a WebCalendar user. */ CREATE TABLE webcal_user ( /* the unique user login */ cal_login VARCHAR(25) NOT NULL, /* the user's password. (not used for http or ldap authentication) */ cal_passwd VARCHAR(32), /* user's last name */ cal_lastname VARCHAR(25), /* user's first name */ cal_firstname VARCHAR(25), /* is the user a WebCalendar administrator ('Y' = yes, 'N' = no) */ cal_is_admin CHAR(1) DEFAULT 'N', /* user's email address */ cal_email VARCHAR(75) NULL, PRIMARY KEY ( cal_login ) ); # create a default admin user INSERT INTO webcal_user ( cal_login, cal_passwd, cal_lastname, cal_firstname, cal_is_admin ) VALUES ( 'admin', '21232f297a57a5a743894a0e4a801fc3', 'Administrator', 'Default', 'Y' ); /* * Defines a calendar event. Each event in the system has one entry * in this table unless the event starts before midnight and ends * after midnight. In that case a secondary event will be created with * cal_ext_for_id set to the cal_id of the original entry. * The following tables contain additional information about each * event: */ CREATE TABLE webcal_entry ( /* cal_id is unique integer id for event */ cal_id INT NOT NULL, /* cal_group_id: the parent event id if this event is overriding an */ /* occurrence of a repeating event */ cal_group_id INT NULL, /* used when an event goes past midnight into the */ /* next day, in which case an additional entry in this table */ /* will use this field to indicate the original event cal_id */ cal_ext_for_id INT NULL, /* user login of user that created the event */ cal_create_by VARCHAR(25) NOT NULL, /* date of event (in YYYYMMDD format) */ cal_date INT NOT NULL, /* event time (in HHMMSS format) */ cal_time INT NULL, /* date the event was last modified (in YYYYMMDD format) */ cal_mod_date INT, /* time the event was last modified (in HHMMSS format) */ cal_mod_time INT, /* duration of event in minutes */ cal_duration INT NOT NULL, /* event priority: 1=Low, 2=Med, 3=High */ cal_priority INT DEFAULT 2, /* 'E' = Event, 'M' = Repeating event */ cal_type CHAR(1) DEFAULT 'E', /* 'P' = Public, */ /* 'R' = Confidential (others can see time allocated but not what it is) */ cal_access CHAR(1) DEFAULT 'P', /* brief description of event */ cal_name VARCHAR(80) NOT NULL, /* full description of event */ cal_description TEXT, PRIMARY KEY ( cal_id ) ); /* * Defines repeating info about an event. * The event is defined in webcal_entry. */ CREATE TABLE webcal_entry_repeats ( /* event id */ cal_id INT DEFAULT 0 NOT NULL, /* type of repeating: