<?xml version="1.0"?>
<schema version="0.3">
  <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="project_id" 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="edit_own_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="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="add_to_assignees" type="I" size="1">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="view_reports" type="I" size="1">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="add_votes" type="I" size="1">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="edit_assignments" type="I" size="1">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="show_as_assignees" type="I" size="1">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="group_open" type="I" size="1">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <index name="group_name">
      <UNIQUE/>
      <col>group_name</col>
      <col>project_id</col>
    </index>
    <index name="belongs_to_project">
      <col>project_id</col>
    </index>
  </table>
  <table name="cache">
    <field name="id" type="I" size="6">
      <KEY/>
      <AUTOINCREMENT/>
    </field>
    <field name="type" type="C" size="4">
      <NOTNULL/>
    </field>
    <field name="content" type="XL">
      <NOTNULL/>
    </field>
    <field name="topic" type="C" size="30">
      <NOTNULL/>
    </field>
    <field name="last_updated" type="I" size="11">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="project_id" type="I" size="11">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="max_items" type="I" size="11">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <index name="cache_type">
      <UNIQUE/>
      <col>type</col>
      <col>topic</col>
      <col>project_id</col>
      <col>max_items</col>
    </index>
    <index name="cache_type_topic">
      <col>type</col>
      <col>topic</col>
    </index>
  </table>
  <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="I" size="11">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="resolved_by" type="I" size="5">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="time_resolved" type="I" size="11">
      <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="deny_reason" type="C" size="255" />
  </table>
</schema>
