<?xml version="1.0"?>
<schema version="0.2">
  <table name="projects">
    <field name="project_id" type="I">
      <KEY/>
	  <NOTNULL/>
    </field>
    <field name="title" type="C" size="255">
	  <NOTNULL/>
    </field>
    <field name="description" type="X">
    </field>
    <field name="companyid" type="I">
	  <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="projleaderid" type="I">
	  <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="keyaccountid" type="I">
	  <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="startdate" type="D">
    </field>
    <field name="targetdate" type="D">
    </field>
    <field name="enddate" type="D">
    </field>
    <field name="status" type="C" size="1">
      <DEFAULT value="A"/>
    </field>
    <field name="owner" type="I">
	  <NOTNULL/>
    </field>
    <field name="lu_user" type="I">
	  <NOTNULL/>
    </field>
    <field name="lu_date" type="T">
    </field>
  </table>

  <table name="projects_comments">
    <field name="comment_id" type="I">
	  <KEY/>
	  <NOTNULL/>
    </field>
    <field name="task_id" type="I">
	  <NOTNULL/>
    </field>
    <field name="project_id" type="I">
	  <NOTNULL/>
    </field>
    <field name="owner" type="I">
    </field>
    <field name="date" type="T">
    </field>
    <field name="comment" type="X">
    </field>
  </table>

  <table name="projects_tasks">
    <field name="task_id" type="I">
	  <KEY/>
	  <NOTNULL/>
    </field>
    <field name="project_id" type="I">
	  <NOTNULL/>
    </field>
    <field name="parent_id" type="I">
	  <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="constrain_id" type="I">
	  <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="title" type="C" size="255">
	  <NOTNULL/>
    </field>
    <field name="description" type="X">
    </field>
    <field name="status" type="C" size="1">
    </field>
    <field name="milestone" type="C" size="1">
	  <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="hours" type="N" size="8.2">
    </field>
    <field name="usedhours" type="N" size="8.2">
    </field>
    <field name="startdate" type="D">
    </field>
    <field name="targetdate" type="D">
    </field>
    <field name="enddate" type="D">
    </field>
    <field name="assignee" type="I">
	  <NOTNULL/>
      <DEFAULT value="1"/>
    </field>
    <field name="billable" type="C" size="1">
	  <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="comments" type="C" size="1">
	  <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
  </table>

   
  <mgw>
	<moduleDefinition>
		<module>
			<module_type>3</module_type>
			<name>projects</name>
			<version>0.82</version>
			<date>2004-01-14</date>
			<author>Karsten Dambekalns</author>
			<email>k.dambekalns@fishfarm.de</email>
			<description>Projects module for managing projects and related tasks.</description>
			<compatibility>0.7.1</compatibility>
			<dependancies>
				<dependancy>contact</dependancy>
			</dependancies>
			<secure>true</secure>
		</module>
	</moduleDefinition>
  </mgw>
</schema>

