Skip to content
Snippets Groups Projects
DatabaseSchema.xml 209 KiB
Newer Older
Prasad's avatar
Prasad committed
			<col>crmid</col>
		</index>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_senotesrel" alter="true">
		<constraint>ADD CONSTRAINT fk_1_vtiger_senotesrel FOREIGN KEY (crmid) REFERENCES vtiger_crmentity(crmid) ON DELETE CASCADE</constraint>
		<constraint>ADD CONSTRAINT fk_2_vtiger_senotesrel FOREIGN KEY (notesid) REFERENCES vtiger_notes(notesid) ON DELETE CASCADE</constraint>
		<opt>Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
		<data>
		</data>
	</table>

	<table name="vtiger_ticketcf">
		<field name="ticketid" type="I" size="19">
			<key />
			<default value="0" />
		</field>
		<field name="from_portal" type="C" size="3" />

		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_ticketcf" alter="true">
		<constraint>ADD CONSTRAINT fk_1_vtiger_ticketcf FOREIGN KEY (ticketid) REFERENCES vtiger_troubletickets(ticketid) ON DELETE CASCADE</constraint>
		<opt>Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
		<data>
		</data>
	</table>

	<table name="vtiger_productcf">
		<field name="productid" type="I" size="19">
			<key />
			<default value="0" />
		</field>

		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_productcf" alter="true">
		<constraint>ADD CONSTRAINT fk_1_vtiger_productcf FOREIGN KEY (productid) REFERENCES vtiger_products(productid) ON DELETE CASCADE</constraint>
		<opt>Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
		<data>
		</data>
	</table>

	<table name="vtiger_users_last_import">
		<field name="id" type="I" size="36">
			<autoincrement />
			<key />
		</field>
		<field name="assigned_user_id" type="C" size="36" />
		<field name="bean_type" type="C" size="36" />
		<field name="bean_id" type="C" size="36" />
		<field name="deleted" type="I" size="1">
			<notnull />
			<default value="0" />
		</field>

		<index name="idx_user_id">
			<col>assigned_user_id</col>
		</index>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_wordtemplates">
		<field name="templateid" type="I" size="19">
			<key />
		</field>
		<field name="filename" type="C" size="100">
			<notnull />
		</field>
		<field name="module" type="C" size="30">
			<notnull />
		</field>
		<field name="date_entered" type="T">
			<notnull />
			<deftimestamp />
		</field>
		<field name="parent_type" type="C" size="50">
			<notnull />
		</field>
		<field name="data" type="B">
			<notnull />
		</field>
		<field name="description" type="X" />
		<field name="filesize" type="C" size="50">
			<notnull />
		</field>
		<field name="filetype" type="C" size="20">
			<notnull />
		</field>
		<field name="deleted" type="I" size="1">
			<notnull />
			<default value="0" />
		</field>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_accountrating">
		<field name="accountratingid" type="I" size="19">
			<key />
			<autoincrement />
		</field>
		<field name="rating" type="C" size="200">
			<notnull />
		</field>
		<field name="sortorderid" type="I" size="19">
			<notnull />
			<default value="0" />
		</field>
		<field name="presence" type="I" size="1">
			<notnull />
			<default value="1" />
		</field>

		<index name="accountrating_rating_idx">
			<col>rating</col>
			<unique />
		</index>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_accounttype">
		<field name="accounttypeid" type="I" size="19">
			<key />
			<autoincrement />
		</field>
		<field name="accounttype" type="C" size="200">
			<notnull />
		</field>
		<field name="presence" type="I" size="1">
			<notnull />
			<default value="1" />
		</field>
		<field name="picklist_valueid" type="I" size="19">
			<notnull />
			<default value="0" />
		</field>
		<field name="sortorderid" type="I" size="11"></field>
		<index name="accounttype_accounttype_idx">
			<col>accounttype</col>
			<unique />
		</index>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_leadsource">
		<field name="leadsourceid" type="I" size="19">
			<key />
			<autoincrement />
		</field>
		<field name="leadsource" type="C" size="200">
			<notnull />
		</field>
		<field name="presence" type="I" size="1">
			<notnull />
			<default value="1" />
		</field>
		<field name="picklist_valueid" type="I" size="19">
			<notnull />
			<default value="0" />
		</field>
		<field name="sortorderid" type="I" size="11"></field>
		<index name="leadsource_source_idx">
			<col>source</col>
			<unique />
		</index>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_opportunity_type">
		<field name="opptypeid" type="I" size="19">
			<key />
			<autoincrement />
		</field>
		<field name="opportunity_type" type="C" size="200">
			<notnull />
		</field>
		<field name="presence" type="I" size="1">
			<notnull />
			<default value="1" />
		</field>
		<field name="picklist_valueid" type="I" size="19">
			<notnull />
			<default value="0" />
		</field>
		<field name="sortorderid" type="I" size="11"></field>
		<index name="opportunity_type_opportunity_type_idx">
			<col>opportunity_type</col>
			<unique />
		</index>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_leadstage">
		<field name="leadstageid" type="I" size="19">
			<key />
			<autoincrement />
		</field>
		<field name="stage" type="C" size="200">
			<notnull />
		</field>
		<field name="sortorderid" type="I" size="19">
			<notnull />
			<default value="0" />
		</field>
		<field name="presence" type="I" size="1">
			<notnull />
			<default value="1" />
		</field>

		<index name="leadstage_stage_idx">
			<col>stage</col>
			<unique />
		</index>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_leadstatus">
		<field name="leadstatusid" type="I" size="19">
			<key />
			<autoincrement />
		</field>
		<field name="leadstatus" type="C" size="200">
			<notnull />
		</field>
		<field name="presence" type="I" size="1">
			<notnull />
			<default value="1" />
		</field>
		<field name="picklist_valueid" type="I" size="19">
			<notnull />
			<default value="0" />
		</field>
		<field name="sortorderid" type="I" size="11"></field>
		<index name="leadstatus_status_idx">
			<col>status</col>
			<unique />
		</index>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_eventstatus">
		<field name="eventstatusid" type="I" size="19">
			<key />
			<autoincrement />
		</field>
		<field name="eventstatus" type="C" size="200">
			<notnull />
		</field>
		<field name="presence" type="I" size="1">
			<notnull />
			<default value="1" />
		</field>
		<field name="picklist_valueid" type="I" size="19">
			<notnull />
			<default value="0" />
		</field>
		<field name="sortorderid" type="I" size="11"></field>
		<index name="eventstatus_status_idx">
			<col>status</col>
			<unique />
		</index>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_duration_minutes">
		<field name="minutesid" type="I" size="19">
			<key />
			<autoincrement />
		</field>
		<field name="duration_minutes" type="C" size="200">
			<notnull />
		</field>
		<field name="sortorderid" type="I" size="19">
			<notnull />
			<default value="0" />
		</field>
		<field name="presence" type="I" size="1">
			<notnull />
			<default value="1" />
		</field>

		<index name="duration_minutes_status_idx">
			<col>status</col>
			<unique />
		</index>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_opportunitystage">
		<field name="potstageid" type="I" size="19">
			<key />
			<autoincrement />
		</field>
		<field name="stage" type="C" size="200">
			<notnull />
		</field>
		<field name="sortorderid" type="I" size="19">
			<notnull />
			<default value="0" />
		</field>
		<field name="presence" type="I" size="1">
			<notnull />
			<default value="1" />
		</field>
		<field name="probability" type="N" size="3.2">
			<default value="0" />
		</field>

		<index name="opportunitystage_stage_idx">
			<col>stage</col>
			<unique />
		</index>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_priority">
		<field name="priorityid" type="I" size="19">
			<key />
			<autoincrement />
		</field>
		<field name="priority" type="C" size="200">
			<notnull />
		</field>
		<field name="sortorderid" type="I" size="19">
			<notnull />
			<default value="0" />
		</field>
		<field name="presence" type="I" size="1">
			<notnull />
			<default value="1" />
		</field>

		<index name="priority_priority_idx">
			<col>priority</col>
			<unique />
		</index>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_industry">
		<field name="industryid" type="I" size="19">
			<key />
			<autoincrement />
		</field>
		<field name="industry" type="C" size="200">
			<notnull />
		</field>
		<field name="presence" type="I" size="1">
			<notnull />
			<default value="1" />
		</field>
		<field name="picklist_valueid" type="I" size="19">
			<notnull />
			<default value="0" />
		</field>
		<field name="sortorderid" type="I" size="11"></field>
		<index name="industry_industry_idx">
			<col>industry</col>
			<unique />
		</index>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_salutationtype">
		<field name="salutationid" type="I" size="19">
			<key />
			<autoincrement />
		</field>
		<field name="salutationtype" type="C" size="200">
			<notnull />
		</field>
		<field name="presence" type="I" size="1">
			<notnull />
			<default value="1" />
		</field>
		<field name="picklist_valueid" type="I" size="19">
			<notnull />
			<default value="0" />
		</field>
		<field name="sortorderid" type="I" size="11"></field>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_taskpriority">
		<field name="taskpriorityid" type="I" size="19">
			<key />
			<autoincrement />
		</field>
		<field name="taskpriority" type="C" size="200" />
		<field name="presence" type="I" size="1">
			<notnull />
			<default value="1" />
		</field>
		<field name="picklist_valueid" type="I" size="19">
			<notnull />
			<default value="0" />
		</field>
		<field name="sortorderid" type="I" size="11"></field>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_taskstatus">
		<field name="taskstatusid" type="I" size="19">
			<key />
			<autoincrement />
		</field>
		<field name="taskstatus" type="C" size="200" />
		<field name="presence" type="I" size="1">
			<notnull />
			<default value="1" />
		</field>
		<field name="picklist_valueid" type="I" size="19">
			<notnull />
			<default value="0" />
		</field>
		<field name="sortorderid" type="I" size="11"></field>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_activitytype">
		<field name="activitytypeid" type="I" size="19">
			<key />
			<autoincrement />
		</field>
		<field name="activitytype" type="C" size="200">
			<notnull />
		</field>
		<field name="presence" type="I" size="1">
			<notnull />
			<default value="1" />
		</field>
		<field name="picklist_valueid" type="I" size="19">
			<notnull />
			<default value="0" />
		</field>
		<field name="sortorderid" type="I" size="11"></field>
		<index name="activitytype_activitytype_idx">
			<col>activitytype</col>
			<unique />
		</index>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_sales_stage">
		<field name="sales_stage_id" type="I" size="19">
			<key />
			<autoincrement />
		</field>
		<field name="sales_stage" type="C" size="200">
		</field>
		<field name="presence" type="I" size="1">
			<notnull />
			<default value="1" />
		</field>
		<field name="picklist_valueid" type="I" size="19">
			<notnull />
			<default value="0" />
		</field>
		<field name="sortorderid" type="I" size="11"></field>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_faqcategories">
		<field name="faqcategories_id" type="I" size="19">
			<key />
			<autoincrement />
		</field>
		<field name="faqcategories" type="C" size="200" />
		<field name="presence" type="I" size="1">
			<notnull />
			<default value="1" />
		</field>
		<field name="picklist_valueid" type="I" size="19">
			<notnull />
			<default value="0" />
		</field>
		<field name="sortorderid" type="I" size="11"></field>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_faqstatus">
		<field name="faqstatus_id" type="I" size="19">
			<key />
			<autoincrement />
		</field>
		<field name="faqstatus" type="C" size="200" />
		<field name="presence" type="I" size="1">
			<notnull />
			<default value="1" />
		</field>
		<field name="picklist_valueid" type="I" size="19">
			<notnull />
			<default value="0" />
		</field>
		<field name="sortorderid" type="I" size="11"></field>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

Prasad's avatar
Prasad committed
	<table name="vtiger_faqcf"> 
		<field name="faqid" type="I" size="19"> 
			<key /> 
			<default value="0" /> 
		</field> 
Prasad's avatar
Prasad committed

		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt> 
Prasad's avatar
Prasad committed
	</table> 

	<table name="vtiger_faqcf" alter="true"> 
		<constraint>ADD CONSTRAINT fk_1_vtiger_faqcf FOREIGN KEY (faqid) REFERENCES vtiger_faq(id) ON DELETE CASCADE</constraint> 
		<opt>Engine=InnoDB DEFAULT CHARSET utf8</opt> 
Prasad's avatar
Prasad committed
		<data> 
		</data> 
	</table> 
Prasad's avatar
Prasad committed

	<table name="vtiger_rating">
		<field name="rating_id" type="I" size="19">
			<key />
			<autoincrement />
		</field>
		<field name="rating" type="C" size="200" />
		<field name="presence" type="I" size="1">
			<notnull />
			<default value="1" />
		</field>
		<field name="picklist_valueid" type="I" size="19">
			<notnull />
			<default value="0" />
		</field>
		<field name="sortorderid" type="I" size="11"></field>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_ticketcategories">
		<field name="ticketcategories_id" type="I" size="19">
			<key />
			<autoincrement />
		</field>
		<field name="ticketcategories" type="C" size="200" />
		<field name="presence" type="I" size="1">
			<notnull />
			<default value="0" />
		</field>
		<field name="picklist_valueid" type="I" size="19">
			<notnull />
			<default value="0" />
		</field>
		<field name="sortorderid" type="I" size="11"></field>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_ticketpriorities">
		<field name="ticketpriorities_id" type="I" size="19">
			<key />
			<autoincrement />
		</field>
		<field name="ticketpriorities" type="C" size="200" />
		<field name="presence" type="I" size="1">
			<notnull />
			<default value="0" />
		</field>
		<field name="picklist_valueid" type="I" size="19">
			<notnull />
			<default value="0" />
		</field>
		<field name="sortorderid" type="I" size="11"></field>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_ticketseverities">
		<field name="ticketseverities_id" type="I" size="19">
			<key />
			<autoincrement />
		</field>
		<field name="ticketseverities" type="C" size="200" />
		<field name="presence" type="I" size="1">
			<notnull />
			<default value="0" />
		</field>
		<field name="picklist_valueid" type="I" size="19">
			<notnull />
			<default value="0" />
		</field>
		<field name="sortorderid" type="I" size="11"></field>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_ticketstatus">
		<field name="ticketstatus_id" type="I" size="19">
			<key />
			<autoincrement />
		</field>
		<field name="ticketstatus" type="C" size="200" />
		<field name="presence" type="I" size="1">
			<notnull />
			<default value="0" />
		</field>
		<field name="picklist_valueid" type="I" size="19">
			<notnull />
			<default value="0" />
		</field>
		<field name="sortorderid" type="I" size="11"></field>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_durationhrs">
		<field name="hrsid" type="I" size="19">
			<key />
			<autoincrement />
		</field>
		<field name="hrs" type="C" size="50" />
		<field name="sortorderid" type="I" size="19">
			<notnull />
			<default value="0" />
		</field>
		<field name="presence" type="I" size="1">
			<notnull />
			<default value="1" />
		</field>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_durationmins">
		<field name="minsid" type="I" size="19">
			<key />
			<autoincrement />
		</field>
		<field name="mins" type="C" size="50" />
		<field name="sortorderid" type="I" size="19">
			<notnull />
			<default value="0" />
		</field>
		<field name="presence" type="I" size="1">
			<notnull />
			<default value="1" />
		</field>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_profile">
		<field name="profileid" type="I" size="10">
			<key />
			<autoincrement />
		</field>
		<field name="profilename" type="C" size="50">
			<notnull />
		</field>
		<field name="description" type="X" />

		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_profile2globalpermissions">
		<field name="profileid" type="I" size="19">
			<key />
		</field>
		<field name="globalactionid" type="I" size="19">
			<key />
		</field>
		<field name="globalactionpermission" type="I" size="19" />

		<index name="idx_profile2globalpermissions">
			<col>profileid</col>
			<col>globalactionid</col>
		</index>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_profile2globalpermissions" alter="true">
		<constraint>ADD CONSTRAINT fk_1_vtiger_profile2globalpermissions FOREIGN KEY (profileid) REFERENCES vtiger_profile(profileid) ON DELETE CASCADE</constraint>
		<opt>Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
		<data>
		</data>
	</table>

	<table name="vtiger_profile2tab">
		<field name="profileid" type="I" size="11" />
		<field name="tabid" type="I" size="10" />
		<field name="permissions" type="I" size="10">
			<notnull />
			<default value="0" />
		</field>

		<index name="profile2tab_profileid_tabid_idx">
			<col>profileid</col>
			<col>tabid</col>
		</index>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_profile2standardpermissions">
		<field name="profileid" type="I" size="11">
			<key />
		</field>
		<field name="tabid" type="I" size="10">
			<key />
		</field>
		<field name="operation" type="I" size="10">
			<key />
		</field>
		<field name="permissions" type="I" size="1" />

		<index name="profile2standardpermissions_profileid_tabid_operation_idx">
			<col>profileid</col>
			<col>tabid</col>
			<col>operation</col>
		</index>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_profile2field">
		<field name="profileid" type="I" size="11">
			<key />
		</field>
		<field name="tabid" type="I" size="10" />
		<field name="fieldid" type="I" size="19">
			<key />
		</field>
		<field name="visible" type="I" size="19" />
		<field name="readonly" type="I" size="19" />

		<index name="profile2field_profileid_tabid_fieldname_idx">
			<col>profileid</col>
			<col>tabid</col>
			<col>fieldname</col>
		</index>
		<index name="profile2field_tabid_profileid_idx">
			<col>tabid</col>
			<col>profileid</col>
		</index>
		<index name="profile2field_visible_profileid_idx">
			<col>visible</col>
			<col>profileid</col>
		</index>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_role2profile">
		<field name="roleid" type="C" size="255">
			<key />
		</field>
		<field name="profileid" type="I" size="11">
			<key />
		</field>
		<index name="role2profile_roleid_profileid_idx">
			<col>roleid</col>
			<col>profileid</col>
		</index>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_org_share_action_mapping">
		<field name="share_action_id" type="I" size="19">
			<key />
		</field>
		<field name="share_action_name" type="C" size="200" />

		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_def_org_share">
		<field name="ruleid" type="I" size="11">
			<key />
			<autoincrement />
		</field>
		<field name="tabid" type="I" size="11">
			<notnull />
		</field>
		<field name="permission" type="I" size="19">
		</field>
		<field name="editstatus" type="I" size="19" />
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_def_org_share" alter="true">
		<constraint>ADD CONSTRAINT fk_1_vtiger_def_org_share FOREIGN KEY (permission) REFERENCES vtiger_org_share_action_mapping(share_action_id) ON DELETE CASCADE</constraint>
		<opt>Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
		<data>
		</data>
	</table>

	<table name="vtiger_def_org_field">
		<field name="tabid" type="I" size="10" />
		<field name="fieldid" type="I" size="19">
			<key />
		</field>
		<field name="visible" type="I" size="19" />
		<field name="readonly" type="I" size="19" />

		<index name="def_org_field_tabid_fieldid_idx">
			<col>tabid</col>
			<col>fieldid</col>
		</index>
		<index name="def_org_field_tabid_idx">
			<col>tabid</col>
		</index>
		<index name="def_org_field_visible_fieldid_idx">
			<col>visible</col>
			<col>fieldid</col>
		</index>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_profile2utility">
		<field name="profileid" type="I" size="11">
			<key />
		</field>
		<field name="tabid" type="I" size="11">
			<key />
		</field>
		<field name="activityid" type="I" size="11">
			<key />
		</field>
		<field name="permission" type="I" size="1" />

		<index name="profile2utility_profileid_tabid_activityid_idx">
			<col>profileid</col>
			<col>tabid</col>
			<col>activityid</col>
		</index>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_productcategory">
		<field name="productcategoryid" type="I" size="19">
			<key />
			<autoincrement />
		</field>
		<field name="productcategory" type="C" size="200">
			<notnull />
		</field>
		<field name="presence" type="I" size="1">
			<notnull />
			<default value="1" />
		</field>
		<field name="picklist_valueid" type="I" size="19">
			<notnull />
			<default value="0" />
		</field>
		<field name="sortorderid" type="I" size="11"></field>
		<index name="productcategory_productcategory_idx">
			<col>productcategory</col>
			<unique />
		</index>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_salesorder">
		<field name="salesorderid" type="I" size="19">
			<key />
			<notnull />
			<default value="0" />
		</field>
		<field name="subject" type="C" size="100" />
		<field name="potentialid" type="I" size="19" />
		<field name="customerno" type="C" size="100" />
		<field name="salesorder_no" type="C" size="100" />
		<field name="quoteid" type="I" size="19" />
		<field name="vendorterms" type="C" size="100" />
		<field name="contactid" type="I" size="19">
		</field>
		<field name="vendorid" type="I" size="19">
		</field>
		<field name="duedate" type="D" />
		<field name="carrier" type="C" size='200' />
		<field name="pending" type="C" size='200' />
		<field name="type" type="C" size="100" />
		<field name="adjustment" type="N" size="25.3" />
		<field name="salescommission" type="N" size="25.3" />
		<field name="exciseduty" type="N" size="25.3" />
		<field name="total" type="N" size="25.3" />
		<field name="subtotal" type="N" size="25.3" />
		<field name="taxtype" type="C" size="25" />
		<field name="discount_percent" type="N" size="25.3" />
		<field name="discount_amount" type="N" size="25.3" />
		<field name="s_h_amount" type="N" size="25.3" />
		<field name="accountid" type="I" size="19" />
		<field name="terms_conditions" type="X" />
		<field name="purchaseorder" type="C" size='200' />
		<field name="sostatus" type="C" size='200' />
		<field name="currency_id" type="I" size='19' >
			<notnull />
			<default value="1" />
		</field>
		<field name="conversion_rate" type="N" size='10.3' >
			<notnull />
			<default value="1.000" />
		</field>
		<field name="enable_recurring" type="I">
			<default value="0" />
		</field>
		<field name="compound_taxes_info" type="X" />
Prasad's avatar
Prasad committed
		<index name="salesorder_vendorid_idx">
			<col>vendorid</col>
		</index>
		<index name="salesorder_contactid_idx">
			<col>contactid</col>
		</index>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_salesorder" alter="true">
		<constraint>ADD CONSTRAINT fk_1_vtiger_salesorder FOREIGN KEY (contactid) REFERENCES vtiger_contactdetails(contactid) ON DELETE CASCADE</constraint>
		<constraint>ADD CONSTRAINT fk_2_vtiger_salesorder FOREIGN KEY (salesorderid) REFERENCES vtiger_crmentity(crmid) ON DELETE CASCADE</constraint>
		<constraint>ADD CONSTRAINT fk_3_vtiger_salesorder FOREIGN KEY (vendorid) REFERENCES vtiger_vendor(vendorid) ON DELETE CASCADE</constraint>
		<opt>Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
		<data>
		</data>
	</table>

	<table name="vtiger_sobillads">
		<field name="sobilladdressid" type="I" size="19">
			<key />
			<default value="0" />
		</field>
		<field name="bill_city" type="C" size="30" />
		<field name="bill_code" type="C" size="30" />
		<field name="bill_country" type="C" size="30" />
		<field name="bill_state" type="C" size="30" />
		<field name="bill_street" type="C" size="250" />
		<field name="bill_pobox" type="C" size="30" />

		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_sobillads" alter="true">
		<constraint>ADD CONSTRAINT fk_1_vtiger_sobillads FOREIGN KEY (sobilladdressid) REFERENCES vtiger_salesorder(salesorderid) ON DELETE CASCADE</constraint>
		<opt>Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
		<data>
		</data>
	</table>

	<table name="vtiger_soshipads">
		<field name="soshipaddressid" type="I" size="19">
			<key />
			<default value="0" />
		</field>
		<field name="ship_city" type="C" size="30" />
		<field name="ship_code" type="C" size="30" />
		<field name="ship_country" type="C" size="30" />
		<field name="ship_state" type="C" size="30" />
		<field name="ship_street" type="C" size="250" />
		<field name="ship_pobox" type="C" size="30" />

		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_soshipads" alter="true">
		<constraint>ADD CONSTRAINT fk_1_vtiger_soshipads FOREIGN KEY (soshipaddressid) REFERENCES vtiger_salesorder(salesorderid) ON DELETE CASCADE</constraint>
		<opt>Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
		<data>
		</data>
	</table>

	<table name="vtiger_salesordercf">
		<field name="salesorderid" type="I" size="19">
			<key />
			<default value="0"/>
		</field>

		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_salesordercf" alter="true">
		<constraint>ADD CONSTRAINT fk_1_vtiger_salesordercf FOREIGN KEY (salesorderid) REFERENCES vtiger_salesorder(salesorderid) ON DELETE CASCADE</constraint>
		<opt>Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
		<data>
		</data>
	</table>


	<table name="vtiger_notificationscheduler">
		<field name="schedulednotificationid" type="I" size="19">
			<key />
			<autoincrement />
		</field>
		<field name="schedulednotificationname" type="C" size="200" />
		<field name="active" type="I" size="1" />
		<field name="notificationsubject" type="C" size="200" />
		<field name="notificationbody" type="X" />
		<field name="label" type="C" size="50" />
		<field name="type" type="C" size="10" />
		<index name="notificationscheduler_schedulednotificationname_idx">
			<col>schedulednotificationname</col>
			<unique />
		</index>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_activityproductrel">
		<field name="activityid" type="I" size="19">
			<key />
			<default value="0" />
		</field>
		<field name="productid" type="I" size="19">
			<key />
			<default value="0" />
		</field>