<?xml version="1.0"?>
<schema version="0.3">
  <table name="admin_requests">
    <field name="request_id" type="I" size="5">
      <KEY/>
      <AUTOINCREMENT/>
    </field>
    <field name="project_id" type="I" size="5">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="task_id" type="I" size="5">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="submitted_by" type="I" size="5">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="request_type" type="I" size="2">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="reason_given" type="X">
      <NOTNULL/>
    </field>
    <field name="time_submitted" type="C" size="12">
      <NOTNULL/>
    </field>
    <field name="resolved_by" type="I" size="5">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="time_resolved" type="C" size="12">
      <NOTNULL/>
    </field>
    <field name="deny_reason" type="C" size="255">
      <NOTNULL/>
    </field>
  </table>
  <table name="assigned">
    <field name="assigned_id" type="I" size="10">
      <KEY/>
      <AUTOINCREMENT/>
    </field>
    <field name="task_id" type="I" size="10">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="user_or_group" type="C" size="1">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="user_id" type="I" size="5">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
  </table>
  <table name="attachments">
    <field name="attachment_id" type="I" size="5">
      <KEY/>
      <AUTOINCREMENT/>
    </field>
    <field name="task_id" type="I" size="10">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="comment_id" type="I" size="10">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="orig_name" type="C" size="255">
      <NOTNULL/>
    </field>
    <field name="file_name" type="C" size="30">
      <NOTNULL/>
    </field>
    <field name="file_type" type="C" size="50">
      <NOTNULL/>
    </field>
    <field name="file_size" type="I" size="20">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="added_by" type="I" size="3">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="date_added" type="C" size="12">
      <NOTNULL/>
    </field>
  </table>
  <table name="comments">
    <field name="comment_id" type="I" size="10">
      <KEY/>
      <AUTOINCREMENT/>
    </field>
    <field name="task_id" type="I" size="10">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="date_added" type="C" size="12">
      <NOTNULL/>
    </field>
    <field name="user_id" type="I" size="3">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="comment_text" type="X">
      <NOTNULL/>
    </field>
  </table>
  <table name="dependencies">
    <field name="depend_id" type="I" size="10">
      <KEY/>
      <AUTOINCREMENT/>
    </field>
    <field name="task_id" type="I" size="10">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="dep_task_id" type="I" size="10">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
  </table>
  <table name="groups">
    <field name="group_id" type="I" size="3">
      <KEY/>
      <AUTOINCREMENT/>
    </field>
    <field name="group_name" type="C" size="20">
      <NOTNULL/>
    </field>
    <field name="group_desc" type="C" size="150">
      <NOTNULL/>
    </field>
    <field name="belongs_to_project" type="I" size="3">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="is_admin" type="I" size="1">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="manage_project" type="I" size="1">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="view_tasks" type="I" size="1">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="open_new_tasks" type="I" size="1">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="modify_own_tasks" type="I" size="1">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="modify_all_tasks" type="I" size="1">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="view_comments" type="I" size="1">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="add_comments" type="I" size="1">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="edit_comments" type="I" size="1">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="delete_comments" type="I" size="1">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="view_attachments" type="I" size="1">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="create_attachments" type="I" size="1">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="delete_attachments" type="I" size="1">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="view_history" type="I" size="1">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="close_own_tasks" type="I" size="1">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="close_other_tasks" type="I" size="1">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="assign_to_self" type="I" size="1">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="assign_others_to_self" type="I" size="1">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="view_reports" type="I" size="1">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="group_open" type="I" size="1">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
  </table>
  <table name="history">
    <field name="history_id" type="I" size="10">
      <KEY/>
      <AUTOINCREMENT/>
    </field>
    <field name="task_id" type="I" size="10">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="user_id" type="I" size="3">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="event_date" type="X">
      <NOTNULL/>
    </field>
    <field name="event_type" type="I" size="2">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="field_changed" type="X">
      <NOTNULL/>
    </field>
    <field name="old_value" type="X">
      <NOTNULL/>
    </field>
    <field name="new_value" type="X">
      <NOTNULL/>
    </field>
  </table>
  <table name="list_category">
    <field name="category_id" type="I" size="3">
      <KEY/>
      <AUTOINCREMENT/>
    </field>
    <field name="project_id" type="I" size="3">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="category_name" type="C" size="40">
      <NOTNULL/>
    </field>
    <field name="list_position" type="I" size="3">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="show_in_list" type="I" size="1">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="category_owner" type="I" size="3">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="supertask_id" type="I" size="3">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="lft" type="I" size="10">
      <NOTNULL/>
      <DEFAULT value="0"/>
      <UNSIGNED/>
    </field>
    <field name="rgt" type="I" size="10">
      <NOTNULL/>
      <DEFAULT value="0"/>
      <UNSIGNED/>
    </field>
  </table>
  <table name="list_os">
    <field name="os_id" type="I" size="3">
      <KEY/>
      <AUTOINCREMENT/>
    </field>
    <field name="project_id" type="I" size="3">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="os_name" type="C" size="40">
      <NOTNULL/>
    </field>
    <field name="list_position" type="I" size="3">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="show_in_list" type="I" size="1">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
  </table>
  <table name="list_resolution">
    <field name="resolution_id" type="I" size="3">
      <KEY/>
      <AUTOINCREMENT/>
    </field>
    <field name="resolution_name" type="C" size="40">
      <NOTNULL/>
    </field>
    <field name="list_position" type="I" size="3">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="show_in_list" type="I" size="1">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="project_id" type="I" size="3">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
  </table>
  <table name="list_tasktype">
    <field name="tasktype_id" type="I" size="3">
      <KEY/>
      <AUTOINCREMENT/>
    </field>
    <field name="tasktype_name" type="C" size="40">
      <NOTNULL/>
    </field>
    <field name="list_position" type="I" size="3">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="show_in_list" type="I" size="1">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="project_id" type="I" size="3">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
  </table>
  <table name="list_version">
    <field name="version_id" type="I" size="3">
      <KEY/>
      <AUTOINCREMENT/>
    </field>
    <field name="project_id" type="I" size="3">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="version_name" type="C" size="40">
      <NOTNULL/>
    </field>
    <field name="list_position" type="I" size="3">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="show_in_list" type="I" size="1">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="version_tense" type="I" size="1">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
  </table>
  <table name="notification_messages">
    <field name="message_id" type="I" size="10">
      <KEY/>
      <AUTOINCREMENT/>
    </field>
    <field name="message_subject" type="C" size="50">
      <NOTNULL/>
    </field>
    <field name="message_body" type="X">
      <NOTNULL/>
    </field>
    <field name="time_created" type="C" size="20"/>
  </table>
  <table name="notification_recipients">
    <field name="recipient_id" type="I" size="10">
      <KEY/>
      <AUTOINCREMENT/>
    </field>
    <field name="message_id" type="I" size="10">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="notify_method" type="C" size="1">
      <NOTNULL/>
    </field>
    <field name="notify_address" type="C" size="100">
      <NOTNULL/>
    </field>
  </table>
  <table name="notifications">
    <field name="notify_id" type="I" size="10">
      <KEY/>
      <AUTOINCREMENT/>
    </field>
    <field name="task_id" type="I" size="10">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="user_id" type="I" size="5">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
  </table>
  <table name="prefs">
    <field name="pref_id" type="I" size="1">
      <KEY/>
      <AUTOINCREMENT/>
    </field>
    <field name="pref_name" type="C" size="30">
      <NOTNULL/>
    </field>
    <field name="pref_value" type="C" size="250">
      <NOTNULL/>
    </field>
  </table>
  <table name="projects">
    <field name="project_id" type="I" size="3">
      <KEY/>
      <AUTOINCREMENT/>
    </field>
    <field name="project_title" type="C" size="100">
      <NOTNULL/>
    </field>
    <field name="theme_style" type="C" size="20">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="show_logo" type="I" size="1">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="inline_images" type="I" size="1">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="default_cat_owner" type="I" size="3">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="intro_message" type="X">
      <NOTNULL/>
    </field>
    <field name="project_is_active" type="I" size="1">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="visible_columns" type="C" size="255">
      <NOTNULL/>
    </field>
    <field name="others_view" type="I" size="1">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="anon_open" type="I" size="1">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="notify_email" type="X">
      <NOTNULL/>
    </field>
    <field name="notify_email_when" type="I" size="1">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="notify_jabber" type="X">
      <NOTNULL/>
    </field>
    <field name="notify_jabber_when" type="I" size="1">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
  </table>
  <table name="registrations">
    <field name="reg_id" type="I" size="10">
      <KEY/>
      <AUTOINCREMENT/>
    </field>
    <field name="reg_time" type="C" size="12">
      <NOTNULL/>
    </field>
    <field name="confirm_code" type="C" size="20">
      <NOTNULL/>
    </field>
    <field name="user_name" type="C" size="20">
      <NOTNULL/>
    </field>
    <field name="real_name" type="C" size="100">
      <NOTNULL/>
    </field>
    <field name="email_address" type="C" size="100">
      <NOTNULL/>
    </field>
    <field name="jabber_id" type="C" size="100">
      <NOTNULL/>
    </field>
    <field name="notify_type" type="I" size="1">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="magic_url" type="C" size="40">
      <NOTNULL/>
    </field>
  </table>
  <table name="related">
    <field name="related_id" type="I" size="10">
      <KEY/>
      <AUTOINCREMENT/>
    </field>
    <field name="this_task" type="I" size="10">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="related_task" type="I" size="10">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="is_duplicate" type="I" size="1">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
  </table>
  <table name="reminders">
    <field name="reminder_id" type="I" size="10">
      <KEY/>
      <AUTOINCREMENT/>
    </field>
    <field name="task_id" type="I" size="10">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="to_user_id" type="I" size="3">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="from_user_id" type="I" size="3">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="start_time" type="C" size="12">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="how_often" type="I" size="12">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="last_sent" type="C" size="12">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="reminder_message" type="X">
      <NOTNULL/>
    </field>
  </table>
  <table name="searches">
    <field name="id" type="I" size="11">
      <KEY/>
      <AUTOINCREMENT/>
    </field>
    <field name="user_id" type="I" size="11">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="name" type="C" size="50">
      <NOTNULL/>
    </field>
    <field name="search_string" type="X">
      <NOTNULL/>
    </field>
    <field name="time" type="I" size="11">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
  </table>
  <table name="tasks">
    <field name="task_id" type="I" size="10">
      <KEY/>
      <AUTOINCREMENT/>
    </field>
    <field name="attached_to_project" type="I" size="3">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="task_type" type="I" size="3">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="date_opened" type="C" size="12">
      <NOTNULL/>
    </field>
    <field name="opened_by" type="I" size="3">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="is_closed" type="I" size="1">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="date_closed" type="C" size="12">
      <NOTNULL/>
    </field>
    <field name="closed_by" type="I" size="3">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="closure_comment" type="X">
      <NOTNULL/>
    </field>
    <field name="item_summary" type="C" size="100">
      <NOTNULL/>
    </field>
    <field name="detailed_desc" type="X">
      <NOTNULL/>
    </field>
    <field name="item_status" type="I" size="3">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="assigned_to" type="I" size="3">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="resolution_reason" type="I" size="3">
      <NOTNULL/>
      <DEFAULT value="1"/>
    </field>
    <field name="product_category" type="I" size="3">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="product_version" type="I" size="3">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="closedby_version" type="I" size="3">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="operating_system" type="I" size="3">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="task_severity" type="I" size="3">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="task_priority" type="I" size="3">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="last_edited_by" type="I" size="3">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="last_edited_time" type="C" size="12">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="percent_complete" type="I" size="3">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="mark_private" type="I" size="1">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="due_date" type="I" size="11">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
  </table>
  <table name="users">
    <field name="user_id" type="I" size="3">
      <KEY/>
      <AUTOINCREMENT/>
    </field>
    <field name="user_name" type="C" size="20">
      <NOTNULL/>
    </field>
    <field name="user_pass" type="C" size="40"/>
    <field name="real_name" type="C" size="100">
      <NOTNULL/>
    </field>
    <field name="jabber_id" type="C" size="100">
      <NOTNULL/>
    </field>
    <field name="email_address" type="C" size="100">
      <NOTNULL/>
    </field>
    <field name="notify_type" type="I" size="1">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="account_enabled" type="I" size="1">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="dateformat" type="C" size="30">
      <NOTNULL/>
    </field>
    <field name="dateformat_extended" type="C" size="30">
      <NOTNULL/>
    </field>
    <field name="magic_url" type="C" size="40">
      <NOTNULL/>
    </field>
    <field name="last_search" type="X">
      <NOTNULL/>
    </field>
    <field name="tasks_perpage" type="I" size="3">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
  </table>
  <table name="users_in_groups">
    <field name="record_id" type="I" size="5">
      <KEY/>
      <AUTOINCREMENT/>
    </field>
    <field name="user_id" type="I" size="5">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="group_id" type="I" size="3">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
  </table>
</schema>
