This file was generated using /install/sql/tables-mysql.sql.
Below are the definitions of all WebCalendar tables, along with some descriptions of how each table is used.
Column names shown in red are the primary keys for that table.If you update the SQL for WebCalendar, run the /docs/sql2html.pl script to regenerate this file.
Specifies what WebCalendar functions a user can access.Each function has a corresponding numeric value (specified in the fileincludes/access.php). For example, view event is 0, so the very first characterin the cal_permissions column is either a "Y" if this user can view eventsor an "N" if they cannot.
Column Name Type Length Null Default Description cal_login varchar 25 N user login cal_permissions varchar 64 N a string of Y or N for the various functions
Specifies which users can access another user's calendar.
Column Name Type Length Null Default Description cal_login varchar 25 N the current user who is attempting to look at another user's calendar cal_other_user varchar 25 N the login of the other user whose calendar the current user wants to access cal_can_approve int 3 N can current user approve events on the other user's calendar? cal_can_edit int 3 N can current user edit events on the other user's calendar? cal_can_view int 3 N can current user view events on the other user's calendar? cal_can_email char 1 Y 'Y' can current user send emails to other user? cal_can_invite char 1 Y 'Y' can current user see other user in Participant lists? cal_see_time_only char 1 Y 'N' can current user only see time of other user?
Define assitant/boss relationship.
Column Name Type Length Null Default Description cal_boss varchar 25 N user login of boss cal_assistant varchar 25 N user login of assistant
This table stores event attachments and comments.
Column Name Type Length Null Default Description cal_blob_id int 10 N Unique identifier for this object cal_id int 10 Y NULL event id (if applicable) cal_login varchar 25 Y NULL login of creator cal_description varchar 128 Y NULL description of what the object is (subject for comment) cal_mime_type varchar 50 Y NULL MIME type of object (as specified by browser during upload) (not used for comment) cal_mod_date int 8 N date added (in YYYYMMDD format) cal_mod_time int 6 N time added in HHMMSS format cal_name varchar 30 Y NULL filename of object (not used for comments) cal_size int 10 Y NULL size of object (not used for comment) cal_type char 1 N 'C' type of object: C=Comment, A=Attachment cal_blob longblob Y binary data for object
Defines user categories. Categories can be specific to a user or global.When a category is global, the cat_owner field will be NULL.(Only admin users can create a global category.)
Column Name Type Length Null Default Description cat_id int 10 N unique category id cat_color varchar 8 Y NULL RGB color for category cat_name varchar 80 N category name cat_owner varchar 25 Y NULL user login of category owner. If this is NULL, then it is a global category
System settings (set by the admin interface in admin.php)
Column Name Type Length Null Default Description cal_setting varchar 50 N setting name cal_value varchar 100 Y NULL setting value
Defines a calendar event. Each event in the system has one entry in this tableunless the event starts before midnight and ends after midnight. In that casea secondary event will be created with cal_ext_for_id set to the cal_id of theoriginal entry. The following tables contain additional information about each event:
- webcal_entry_user - lists participants in the event and specifies the status (accepted, rejected) and category of each participant.
- webcal_entry_repeats - contains information if the event repeats.
- webcal_entry_repeats_not - specifies which dates the repeating event does not repeat (because they were deleted or modified for just that date by the user)
- webcal_entry_log - provides a history of changes to this event.
- webcal_site_extras - stores event data as defined in site_extras.php (such as reminders and other custom event fields).
Column Name Type Length Null Default Description cal_id int 10 N unique integer id for event cal_access char 1 Y 'P' P=Public, R=pRivate (others cannot see the event), C=Confidential (others can see time allocated but not what it is) cal_completed int 8 Y NULL date task completed cal_create_by varchar 25 N user login of event creator cal_date int 8 N date of event (in YYYYMMDD format) cal_due_date int 8 Y NULL Task due date cal_due_time int 6 Y NULL Task due time cal_duration int 10 N duration of event in minutes cal_ext_for_id int 10 Y 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_group_id int 10 Y NULL the parent event id if this event is overriding an occurrence of a repeating event cal_location varchar 100 Y NULL location of event cal_mod_date int 8 Y NULL date the event was last modified (in YYYYMMDD format) cal_mod_time int 6 Y NULL time the event was last modified (in HHMMSS format) cal_name varchar 80 N brief description of event cal_priority char 1 Y '5' event priority: 1=Highest, 9=Lowest cal_time int 8 Y NULL event time (in HHMMSS format) cal_type char 1 Y 'E' E=Event, M=Repeating event, T=Task cal_url varchar 100 Y NULL URL of event', cal_description text COMMENT 'full description of event
Contains category foreign keys to enable multiple categories for each event or task
Column Name Type Length Null Default Description cal_id int 10 N id of event. Not unique cat_id int 10 N id of category. Not unique cat_order int 3 N order that user requests their categories appear. Globals are always last cat_owner varchar 25 Y NULL user that owns this record. Global categories will be NULL'
This table associates one or more external users (people who do not have aWebCalendar login) with an event by the event id. An event must still have atleast one WebCalendar user associated with it. This table is not used unlessexternal users are enabled in system settings.The event can be found in webcal_entry.
Column Name Type Length Null Default Description cal_id int 10 N event id cal_fullname varchar 50 N external user full name cal_email varchar 75 Y NULL external user email (for sending a reminder)
Activity log for an event.
Column Name Type Length Null Default Description cal_log_id int 10 N unique id of this log entry cal_date int 8 N date in YYYYMMDD format cal_entry_id int 10 N event id cal_login varchar 25 N user who performed this action cal_time int 6 Y NULL time in HHMMSS format cal_type char 1 N 'C' log types:
- Created
- Approved/Confirmed by user
- Rejected by user
- Updated by user
- Mail Notification sent
- rEminder sent
cal_user_cal varchar 25 Y NULL user of calendar affected cal_text text Y optional text
Defines repeating info about an event.The event is defined in webcal_entry.
Column Name Type Length Null Default Description cal_id int 10 N event id cal_end int 8 Y NULL end date for repeating event (in YYYYMMDD format) cal_endtime int 6 Y NULL end time for repeating event cal_frequency int 3 Y '1' frequency of repeat: 1: every, 2: every other, 3: every 3rd, etc. cal_type varchar 16 Y NULL repeat type:
- daily - every day
- monthlyByDate - repeat on same day of the month
- monthlyBySetPos - repeat based on position within other ByXXX values
- monthlyByDay - repeat on specified weekday
(2nd Monday, for example)- weekly - same day every week
- yearly - same date every year
cal_byday varchar 100 Y NULL this and the following columns are values as specified in RFC2445 cal_bymonth varchar 50 Y NULL cal_bymonthday varchar 100 Y NULL cal_bysetpos varchar 50 Y NULL cal_byweekno varchar 50 Y NULL cal_byyearday varchar 50 Y NULL cal_count int 10 Y NULL cal_wkst char 2 Y 'MO'
This table specifies which dates in a repeating event have either been added,deleted, or overwritten with a replacement event for that day. When replaced,the webcal_entry.cal_group_id, (I know... not the best name, but it was notbeing used) field will be set to the original event. That way the user candelete the original event and (at the same time) delete any exception events.
Column Name Type Length Null Default Description cal_id int 10 N event id of repeating event cal_date int 8 N date event should not repeat (in YYYYMMDD format) cal_exdate char 1 N '1' indicates whether this record is an exclusion (1) or inclusion (0)
This table associates one or more users with an event by the event id.The event can be found in webcal_entry.
Column Name Type Length Null Default Description cal_id int 10 N event id cal_login varchar 25 N participant in the event cal_category int 10 Y NULL category of the event for this user cal_percent int 3 N Task percentage of completion for this user's task cal_status char 1 Y 'A' status of event for this user:
- A=Accepted
- C=Completed
- D=Deleted
- P=In-Progress
- R=Rejected/Declined
- W=Waiting
Define a group.Group members can be found in webcal_group_user.
Column Name Type Length Null Default Description cal_group_id int 10 N unique group id cal_last_update int 8 N date last updated (in YYYYMMDD format) cal_name varchar 50 N name of the group cal_owner varchar 25 Y NULL user login of user that created this group
Specify users in a group.The group is defined in webcal_group.
Column Name Type Length Null Default Description cal_group_id int 10 N group id cal_login varchar 25 N user login
Used to track import data (one row per import)
Column Name Type Length Null Default Description cal_import_id int 10 N unique id for import cal_date int 8 N date of import (YYYYMMDD format) cal_login varchar 25 Y NULL user who performed the import cal_name varchar 50 Y NULL name of import (optional) cal_type varchar 10 N type of import (ical, vcal, palm, outlookcsv)
Used to track import data (one row per event)
Column Name Type Length Null Default Description cal_id int 10 N event id in WebCalendar cal_login varchar 25 N user login cal_external_id varchar 200 Y NULL external id used in external calendar system (for example, UID in iCal) cal_import_id int 10 N import id (from webcal_import table) cal_import_type varchar 10 N type of import: 'palm', 'vcal', 'ical' or 'outlookcsv'
Defines non-user calendars.
Column Name Type Length Null Default Description cal_login varchar 25 N unique id for the calendar cal_admin varchar 25 N who is the calendar administrator cal_firstname varchar 25 Y NULL calendar's first name cal_lastname varchar 25 Y NULL calendar's last name cal_is_public char 1 N 'N' can this nonuser calendar be a public calendar (no login required) cal_url varchar 255 Y NULL url of the remote calendar
Stores information about reminders
Column Name Type Length Null Default Description cal_id int 10 N cal_action varchar 12 N 'EMAIL' action as imported, may be used in the future cal_before char 1 N 'Y' specifies whether reminder is sent before or after selected edge cal_date int 14 N timestamp that specifies send datetime. Use this or cal_offset, but not both cal_duration int 11 N time in ISO 8601 format that specifies time between repeated reminders cal_last_sent int 14 N timestamp of last sent reminder cal_offset int 11 N offset in minutes from the selected edge cal_related char 1 N 'S' S=Start, E=End. Specifies which edge of entry this reminder applies to cal_repeats int 3 N number of times to repeat in addition to original occurance cal_times_sent int 3 N number of times this reminder has been sent
Defines a custom report created by a user.
Column Name Type Length Null Default Description cal_report_id int 10 N unique id of this report cal_allow_nav char 1 Y 'Y' allow user to navigate to different dates with next/previous (Y or N) cal_cat_id int 10 Y NULL category to filter on (optional) cal_include_empty char 1 Y 'N' include empty dates in report (Y or N) cal_include_header char 1 N 'Y' if cal_report_type is 'html', should the DEFAULT HTML header and trailer be included? (Y or N) cal_is_global char 1 N 'N' is this a global report (can it be accessed by other users) (Y or N) cal_login varchar 25 N creator of report cal_report_name varchar 50 N name of the report cal_report_type varchar 20 N format of report (html, plain or csv) cal_show_in_trailer char 1 Y 'N' include a link for this report in the 'Go to' section of the navigation in the page trailer (Y or N) cal_time_range int 2 N report time range:
- 0: tomorrow
- 1: today
- 2: yesterday
- 3: day before yesterday
- 10: next week
- 11: current week
- 12: last week
- 13: week before last
- 20: next week and week after
- 21: current week and next week
- 22: last week and this week
- 23: last two weeks
- 30: next month
- 31: current month
- 32: last month
- 33: month before last
- 40: next year
- 41: current year
- 42: last year
- 43: year before last
cal_update_date int 8 N date created or last updated (in YYYYMMDD format) cal_user varchar 25 Y NULL user calendar to display (NULL indicates current user)
Defines one of the templates used for a report.Each report has three templates:* denotes a required template variable
- Page template - Defines the entire page (except for header and footer).The following variables can be defined:
- ${days}* - the HTML of all dates (generated from the Date template)
- Date template - Defines events for one day. If the report is for a week or month, then the results of each day will be concatenated and used as the ${days} variable in the Page template. The following variables can be defined:
- ${events}* - the HTML of all events for the data (generated from the Event template)
- ${date} - the date
- ${fulldate} - date (includes weekday)
- Event template - Defines a single event. The following variables can be defined:
- ${name}* - Brief Description of event
- ${description} - Full Description of event
- ${date} - Date of event
- ${fulldate} - Date of event (includes weekday)
- ${time} - Time of event (4:00pm - 4:30pm)
- ${starttime} - Start time of event
- ${endtime} - End time of event
- ${duration} - Duration of event (in minutes)
- ${priority} - Priority of event
- ${href} - URL to view event details
Column Name Type Length Null Default Description cal_report_id int 10 N report id (in webcal_report table) cal_template_type char 1 N type of template:
- P: page template represents entire document
- D: date template represents a single day of events
- E: event template represents a single event
cal_template_text text Y text of template
This table holds data for site extra fields (customized in site_extra.php).
Column Name Type Length Null Default Description cal_id int 10 N event id cal_date int 8 Y NULL only used for EXTRA_DATE type fields (in YYYYMMDD format) cal_name varchar 25 N the brief name of this type (first field in $site_extra array) cal_remind int 10 Y NULL how many minutes before event should a reminder be sent cal_type int 11 N EXTRA_URL, EXTRA_DATE, etc. cal_data text Y used to store text data'
This table stores timezones of the world.
Column Name Type Length Null Default Description tzid varchar 100 N Unique name of timezone, try to use Olsen naming conventions dtstart varchar 16 Y NULL earliest date this timezone represents YYYYMMDDTHHMMSSZ format dtend varchar 16 Y NULL last date this timezone represents YYYYMMDDTHHMMSSZ format vtimezone text Y Complete VTIMEZONE text gleaned from imported ics files
Defines a WebCalendar user.
Column Name Type Length Null Default Description cal_login varchar 25 N the unique user login cal_passwd varchar 32 Y NULL the user's password. (not used for http) cal_enabled char 1 Y 'Y' allow admin to disable account (Y or N) cal_is_admin char 1 Y 'N' is the user a WebCalendar administrator (Y or N) cal_last_login int 8 Y NULL user's last log in date cal_firstname varchar 25 Y NULL this and following fields are user's personal info cal_lastname varchar 25 Y NULL cal_address varchar 75 Y NULL cal_birthday int 8 Y NULL cal_email varchar 75 Y NULL cal_telephone varchar 50 Y NULL cal_title varchar 75 Y NULL
Define layers for a user.
Column Name Type Length Null Default Description cal_login varchar 25 N login of owner of this layer cal_layeruser varchar 25 N login name of user that this layer represents cal_layerid int 10 Y unique layer id cal_color varchar 25 Y NULL color to display this layer in cal_dups char 1 Y 'N' show duplicates (N or Y)
Specify preferences for a user. Most preferences are set via pref.php.Values in this table are loaded after system settings found inwebcal_config.
Column Name Type Length Null Default Description cal_login varchar 25 N user login cal_setting varchar 25 N setting name cal_value varchar 100 Y NULL setting value
This table stores the custom header/stylesheet/trailer. If configured properly,each user (or nonuser cal) can have their own custom header/trailer.
Column Name Type Length Null Default Description cal_login varchar 25 N user login (or nonuser cal name), the DEFAULT for all users is stored with the username '__system__' cal_type char 1 N type (H=header, S=stylesheet/script, T=trailer) cal_template_text text Y text of template
A "view" allows a user to put the calendars of multiple users all on one page.A "view" is valid only for the owner (cal_owner) of the view.Users for the view are in webcal_view_user.
Column Name Type Length Null Default Description cal_view_id int 10 N unique view id cal_is_global char 1 N 'N' is this a global view (can it be accessed by other users) (Y or N) cal_name varchar 50 N name of view cal_owner varchar 25 N login name of this view owner cal_view_type char 1 Y NULL W=for week view, D=for day view, M=for month view
Specify users in a view. See webcal_view.
Column Name Type Length Null Default Description cal_view_id int 10 N view id cal_login varchar 25 N a user in the view