Skip to content
Snippets Groups Projects
DatabaseSchema.xml 209 KiB
Newer Older
Prasad's avatar
Prasad committed
	<table name="vtiger_activity" alter="true">
		<constraint>ADD CONSTRAINT fk_1_vtiger_activity FOREIGN KEY (activityid) REFERENCES vtiger_crmentity(crmid) ON DELETE CASCADE</constraint>
		<opt>Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
		<data>
		</data>
	</table>

	<table name="vtiger_attachments">
		<field name="attachmentsid" type="I" size="19">
			<key />
		</field>
		<field name="name" type="C" size="255">
			<notnull />
		</field>
		<field name="description" type="X" />
		<field name="type" type="C" size="100" />
		<field name="path" type="X" />
                <field name="storedname" type="C" size="255" />
Prasad's avatar
Prasad committed
		<field name="subject" type="C" size="255" />
		<index name="attachments_attachmentsid_idx">
			<col>attachmentsid</col>
		</index>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

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

	<table name="vtiger_seattachmentsrel">
		<field name="crmid" type="I" size="19">
			<key />
			<default value="0" />
		</field>
		<field name="attachmentsid" type="I" size="19">
			<key />
			<default value="0" />
		</field>

		<index name="seattachmentsrel_attachmentsid_idx">
			<col>attachmentsid</col>
		</index>
		<index name="seattachmentsrel_crmid_idx">
			<col>crmid</col>
		</index>
		<index name="seattachmentsrel_attachmentsid_crmid_idx">
			<col>attachmentsid</col>
			<col>crmid</col>
		</index>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_seattachmentsrel" alter="true">
		<constraint>ADD CONSTRAINT fk_1_vtiger_seattachmentsrel FOREIGN KEY (attachmentsid) REFERENCES vtiger_attachments(attachmentsid) ON DELETE CASCADE</constraint>
		<constraint>ADD CONSTRAINT fk_2_vtiger_seattachmentsrel FOREIGN KEY (crmid) REFERENCES vtiger_crmentity(crmid) ON DELETE CASCADE</constraint>
		<opt>Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
		<data>
		</data>
	</table>

	<table name="vtiger_tracker">
		<field name="id" type="I" size="11">
			<key />
			<autoincrement />
		</field>
		<field name="user_id" type="C" size="36" />
		<field name="module_name" type="C" size="25" />
		<field name="item_id" type="C" size="36" />
		<field name="item_summary" type="C" size="255" />

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

	<table name="vtiger_vendor">
		<field name="vendorid" type="I" size="19">
			<key />
			<notnull />
			<default value="0" />
		</field>
		<field name="vendor_no" type="C" size="100">
			<notnull />
			<unique />
		</field>
		<field name="vendorname" type="C" size="100" />
		<field name="phone" type="C" size="100" />
		<field name="email" type="C" size="100" />
		<field name="website" type="C" size="100" />
		<field name="glacct" type="C" size="200" />
		<field name="category" type="C" size="50" />
		<field name="street" type="X" />
		<field name="city" type="C" size="30" />
		<field name="state" type="C" size="30" />
		<field name="pobox" type="C" size="30" />
		<field name="postalcode" type="C" size="100" />
		<field name="country" type="C" size="100" />
		<field name="description" type="X" />

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

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

	<table name="vtiger_products">
		<field name="productid" type="I" size="11">
			<key />
		</field>
		<field name="product_no" type="C" size="100">
			<notnull />
			<unique />
		</field>
		<field name="productname" type="C" size="255">
Prasad's avatar
Prasad committed
			<notnull />
		</field>
		<field name="productcode" type="C" size="40" />
		<field name="productcategory" type="C" size="200" />
		<field name="manufacturer" type="C" size="200" />
		<field name="qty_per_unit" type="N" size="11.2">
			<default value="0" />
		</field>
		<field name="unit_price" type="N" size="25.2" />
		<field name="weight" type="N" size="11.3" />
		<field name="pack_size" type="I" size="11" />
		<field name="sales_start_date" type="D" />
		<field name="sales_end_date" type="D" />
		<field name="start_date" type="D" />
		<field name="expiry_date" type="D" />
		<field name="cost_factor" type="I" size="11" />
		<field name="commissionrate" type="N" size="7.3" />
		<field name="commissionmethod" type="C" size="50" />
		<field name="discontinued" type="I" size="1">
			<notnull />
			<default value="0" />
		</field>
		<field name="usageunit" type="C" size="200" />
		<field name="reorderlevel" type="I" size="11" />
		<field name="website" type="C" size="100" />
		<field name="taxclass" type="C" size="200" />
		<field name="mfr_part_no" type="C" size="200" />
		<field name="vendor_part_no" type="C" size="200" />
		<field name="serialno" type="C" size="200" />
		<field name="qtyinstock" type="N" size="25.3" />
		<field name="productsheet" type="C" size="200" />
		<field name="qtyindemand" type="I" size="11" />
		<field name="glacct" type="C" size="200" />
		<field name="vendor_id" type="I" size="11" />
		<field name="imagename" type="X" />
		<field name="currency_id" type="I" size="19">
			<notnull />
			<default value="1" />
		</field>
		<field name="is_subproducts_viewable" type="I" size="1">
			<default value="1" />
		</field>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

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

	<table name="vtiger_currency">
		<field name="currencyid" type="I" size="19">
			<key />
			<autoincrement />
		</field>
		<field name="currency" 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="currency_currency_idx">
			<unique />
			<col>currency</col>
		</index>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_visibility">
		<field name="visibilityid" type="I" size="19">
			<key />
			<autoincrement />
		</field>
		<field name="visibility" 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="visibility_visibility_idx">
			<col>visibility</col>
			<unique />
		</index>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_manufacturer">
		<field name="manufacturerid" type="I" size="19">
			<key />
			<autoincrement />
		</field>
		<field name="manufacturer" 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="manufacturer_manufacturer_idx">
			<unique />
			<col>manufacturer</col>
		</index>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_role">
		<field name="roleid" type="C" size="255">
			<key />
		</field>
		<field name="rolename" type="C" size="200" />
		<field name="parentrole" type="C" size="255" />
		<field name="depth" type="I" size="19" />

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

	<table name="vtiger_user2role">
		<field name="userid" type="I" size="11">
			<key />
		</field>
		<field name="roleid" type="C" size="255">
			<notnull />
		</field>

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

	<table name="vtiger_user2role" alter="true">
		<constraint>ADD CONSTRAINT fk_1_vtiger_user2role FOREIGN KEY (roleid) REFERENCES vtiger_role(roleid) ON DELETE CASCADE</constraint>
		<constraint>ADD CONSTRAINT fk_2_vtiger_user2role FOREIGN KEY (userid) REFERENCES vtiger_users(id) ON DELETE CASCADE</constraint>
		<opt>Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
		<data>
		</data>
	</table>

	<table name="vtiger_groups">
		<field name="groupid" type="I" size="19">
			<key />
		</field>
		<field name="groupname" type="C" size="100" />
		<field name="description" type="X" />

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

	<table name="vtiger_users2group">
		<field name="groupid" type="I" size="19">
			<key />
		</field>
		<field name="userid" type="I" size="19">
			<key />
		</field>

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

	<table name="vtiger_users2group" alter="true">
		<constraint>ADD CONSTRAINT fk_1_vtiger_users2group FOREIGN KEY (groupid) REFERENCES vtiger_groups(groupid) ON DELETE CASCADE</constraint>
		<constraint>ADD CONSTRAINT fk_2_vtiger_users2group FOREIGN KEY (userid) REFERENCES vtiger_users(id) ON DELETE CASCADE</constraint>
		<opt>Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
		<data>
		</data>
	</table>

	<table name="vtiger_group2grouprel">
		<field name="groupid" type="I" size="19">
			<key />
		</field>
		<field name="containsgroupid" type="I" size="19">
			<key />
		</field>

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

	<table name="vtiger_group2grouprel" alter="true">
		<constraint>ADD CONSTRAINT fk_1_vtiger_group2grouprel FOREIGN KEY (containsgroupid) REFERENCES vtiger_groups(groupid) ON DELETE CASCADE ON UPDATE CASCADE</constraint>
		<constraint>ADD CONSTRAINT fk_2_vtiger_group2grouprel FOREIGN KEY (groupid) REFERENCES vtiger_groups(groupid) ON DELETE CASCADE ON UPDATE CASCADE</constraint>
		<opt>Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
		<data>
		</data>
	</table>

	<table name="vtiger_group2role">
		<field name="groupid" type="I" size="19">
			<key />
		</field>
		<field name="roleid" type="C" size="255">
			<key />
		</field>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_group2role" alter="true">
		<constraint>ADD CONSTRAINT fk_1_vtiger_group2role FOREIGN KEY (groupid) REFERENCES vtiger_groups(groupid) ON DELETE CASCADE</constraint>
		<constraint>ADD CONSTRAINT fk_2_vtiger_group2role FOREIGN KEY (roleid) REFERENCES vtiger_role(roleid) ON DELETE CASCADE</constraint>
		<opt>Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
		<data>
		</data>
	</table>

	<table name="vtiger_group2rs">
		<field name="groupid" type="I" size="19">
			<key />
		</field>
		<field name="roleandsubid" type="C" size="255">
			<key />
		</field>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_group2rs" alter="true">
		<constraint>ADD CONSTRAINT fk_1_vtiger_group2rs FOREIGN KEY (groupid) REFERENCES vtiger_groups(groupid) ON DELETE CASCADE</constraint>
		<constraint>ADD CONSTRAINT fk_2_vtiger_group2rs FOREIGN KEY (roleandsubid) REFERENCES vtiger_role(roleid) ON DELETE CASCADE</constraint>
		<opt>Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
		<data>
		</data>
	</table>

	<table name="vtiger_campaign">
		<field name="campaign_no" type="C" size="100">
			<notnull />
			<unique />
		</field>
		<field name="campaignname" type="C" size="255" />
		<field name="campaigntype" type="C" size="200" />
		<field name="campaignstatus" type="C" size="200" />
		<field name="expectedrevenue" type="N" size="25.3" />
		<field name="budgetcost" type="N" size="25.3" />
		<field name="actualcost" type="N" size="25.3" />
		<field name="expectedresponse" type="C" size="200" />
		<field name="numsent" type="N" size="11.0" />
		<field name="product_id" type="I" size="19" />
		<field name="sponsor" type="C" size="255" />
		<field name="targetaudience" type="C" size="255" />
		<field name="targetsize" type="I" size="19" />
		<field name="expectedresponsecount" type="I" size="19" />
		<field name="expectedsalescount" type="I" size="19" />
		<field name="expectedroi" type="N" size="25.3" />
		<field name="actualresponsecount" type="I" size="19" />
		<field name="actualsalescount" type="I" size="19" />
		<field name="actualroi" type="N" size="25.3" />
		<field name="campaignid" type="I" size="19">
			<key />
		</field>
		<field name="closingdate" type="D" />

		<index name="campaign_campaignstatus_idx">
			<col>campaignstatus</col>
		</index>
		<index name="campaign_campaignname_idx">
			<col>campaignname</col>
		</index>
		<index name="campaign_campaignid_idx">
			<col>campaignid</col>
		</index>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_campaignscf">
		<field name="campaignid" 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_campaignscf" alter="true">
		<constraint>ADD CONSTRAINT fk_1_vtiger_campaignscf FOREIGN KEY (campaignid) REFERENCES vtiger_campaign(campaignid) ON DELETE CASCADE</constraint>
		<opt>Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
		<data>
		</data>
	</table>

	<table name="vtiger_campaigncontrel">
		<field name="campaignid" type="I" size="19">
			<key />
			<default value="0"/>
		</field>
		<field name="contactid" type="I" size="19">
			<key />
			<notnull />
			<default value="0"/>
		</field>
		<field name="campaignrelstatusid" type="I" size="19">
			<key />
			<notnull />
			<default value="0"/>
		</field>

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

	<table name="vtiger_campaigncontrel" alter="true">
		<constraint>ADD CONSTRAINT fk_1_vtiger_campaigncontrel FOREIGN KEY (campaignid) REFERENCES vtiger_campaign(campaignid) ON DELETE CASCADE</constraint>
		<constraint>ADD CONSTRAINT fk_2_vtiger_campaigncontrel FOREIGN KEY (contactid) REFERENCES vtiger_contactdetails(contactid) ON DELETE CASCADE</constraint>
		<opt>Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
		<data>
		</data>
	</table>

	<table name="vtiger_campaignleadrel">
		<field name="campaignid" type="I" size="19">
			<key />
			<default value="0" />
		</field>
		<field name="leadid" type="I" size="19">
			<key />
			<notnull />
			<default value="0" />
		</field>
		<field name="campaignrelstatusid" type="I" size="19">
			<key />
			<default value="0" />
		</field>
		<index name="campaignleadrel_leadid_campaignid_idx">
			<col>leadid</col>
			<col>campaignid</col>
		</index>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_campaignleadrel" alter="true">
		<constraint>ADD CONSTRAINT fk_1_vtiger_campaignleadrel FOREIGN KEY (campaignid) REFERENCES vtiger_campaign(campaignid) ON DELETE CASCADE</constraint>
		<constraint>ADD CONSTRAINT fk_2_vtiger_campaignleadrel FOREIGN KEY (leadid) REFERENCES vtiger_leaddetails(leadid) ON DELETE CASCADE</constraint>
		<opt>Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
		<data>
		</data>
	</table>

	<table name="vtiger_contpotentialrel">
		<field name="contactid" type="I" size="19">
			<key />
			<notnull />
			<default value="0" />
		</field>
		<field name="potentialid" type="I" size="19">
			<key />
			<default value="0" />
		</field>

		<index name="contpotentialrel_potentialid_idx">
			<col>potentialid</col>
		</index>
		<index name="contpotentialrel_contactid_idx">
			<col>contactid</col>
		</index>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_contpotentialrel" alter="true">
		<constraint>ADD CONSTRAINT fk_1_vtiger_contpotentialrel FOREIGN KEY (contactid) REFERENCES vtiger_contactdetails(contactid) ON DELETE CASCADE</constraint>
		<constraint>ADD CONSTRAINT fk_2_vtiger_contpotentialrel FOREIGN KEY (potentialid) REFERENCES vtiger_potential(potentialid) ON DELETE CASCADE</constraint>
		<opt>Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
		<data>
		</data>
	</table>

	<table name="vtiger_cntactivityrel">
		<field name="contactid" type="I" size="19">
			<key />
			<notnull />
			<default value="0" />
		</field>
		<field name="activityid" type="I" size="19">
			<key />
			<default value="0" />
		</field>

		<index name="cntactivityrel_contactid_idx">
			<col>contactid</col>
		</index>
		<index name="cntactivityrel_activityid_idx">
			<col>activityid</col>
		</index>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_cntactivityrel" alter="true">
		<constraint>ADD CONSTRAINT fk_1_vtiger_cntactivityrel FOREIGN KEY (activityid) REFERENCES vtiger_activity(activityid) ON DELETE CASCADE</constraint>
		<constraint>ADD CONSTRAINT fk_2_vtiger_cntactivityrel FOREIGN KEY (contactid) REFERENCES vtiger_contactdetails(contactid) ON DELETE CASCADE</constraint>
		<opt>Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
		<data>
		</data>
	</table>

	<table name="vtiger_troubletickets">
		<field name="ticketid" type="I" size="19">
			<key />
		</field>
		<field name="ticket_no" type="C" size="100">
			<notnull />
			<unique />
		</field>
		<field name="groupname" type="C" size="100" />
		<field name="parent_id" type="C" size="100" />
		<field name="product_id" type="C" size="100" />
		<field name="priority" type="C" size="200" />
		<field name="severity" type="C" size="200" />
		<field name="status" type="C" size="200" />
		<field name="category" type="C" size="200" />
		<field name="title" type="C" size="255">
			<notnull />
		</field>
		<field name="solution" type="X" />
		<field name="update_log" type="X" />
		<field name="version_id" type="I" size="11" />
		<field name="hours" type="C" size="200" />
		<field name="days" type="C" size="200" />
		<index name="troubletickets_ticketid_idx">
			<col>ticketid</col>
		</index>
		<index name="troubletickets_status_idx">
			<col>status</col>
		</index>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

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

	<table name="vtiger_ticketcomments">
		<field name="commentid" type="I" size="19">
			<key />
			<autoincrement />
		</field>
		<field name="ticketid" type="I" size="19">
		</field>
		<field name="comments" type="X" />
		<field name="ownerid" type="I" size="19">
			<notnull />
			<default value="0" />
		</field>
		<field name="ownertype" type="C" size="10" />
		<field name="createdtime" type="T" >
			<notnull />
		</field>

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

	<table name="vtiger_ticketcomments" alter="true">
		<constraint>ADD CONSTRAINT fk_1_vtiger_ticketcomments 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_salesmanactivityrel">
		<field name="smid" type="I" size="19">
			<key />
			<default value="0" />
		</field>
		<field name="activityid" type="I" size="19">
			<key />
			<default value="0" />
		</field>

		<index name="salesmanactivityrel_activityid_idx">
			<col>activityid</col>
		</index>
		<index name="salesmanactivityrel_smid_idx">
			<col>smid</col>
		</index>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_salesmanactivityrel" alter="true">
		<constraint>ADD CONSTRAINT fk_1_vtiger_salesmanactivityrel FOREIGN KEY (activityid) REFERENCES vtiger_activity(activityid) ON DELETE CASCADE</constraint>
		<constraint>ADD CONSTRAINT fk_2_vtiger_salesmanactivityrel FOREIGN KEY (smid) REFERENCES vtiger_users(id) ON DELETE CASCADE</constraint>
		<opt>Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
		<data>
		</data>
	</table>

	<table name="vtiger_vendorcontactrel">
		<field name="vendorid" type="I" size="19">
			<key />
			<default value="0" />
		</field>
		<field name="contactid" type="I" size="19">
			<key />
			<default value="0" />
		</field>

		<index name="vendorcontactrel_vendorid_idx">
			<col>vendorid</col>
		</index>
		<index name="vendorcontactrel_contact_idx">
			<col>contactid</col>
		</index>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_vendorcontactrel" alter="true">
		<constraint>ADD CONSTRAINT fk_1_vtiger_vendorcontactrel FOREIGN KEY (contactid) REFERENCES vtiger_contactdetails(contactid) ON DELETE CASCADE</constraint>
		<constraint>ADD CONSTRAINT fk_2_vtiger_vendorcontactrel 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_salesmanticketrel">
		<field name="smid" type="I" size="19">
			<key />
			<default value="0" />
		</field>
		<field name="id" type="I" size="19">
			<key />
			<default value="0" />
		</field>

		<index name="salesmanticketrel_smid_idx">
			<col>smid</col>
		</index>
		<index name="salesmanticketrel_id_idx">
			<col>id</col>
		</index>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

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

	<table name="vtiger_seactivityrel">
		<field name="crmid" type="I" size="19">
			<key />
		</field>
		<field name="activityid" type="I" size="19">
			<key />
		</field>

		<index name="seactivityrel_activityid_idx">
			<col>activityid</col>
		</index>
		<index name="seactivityrel_crmid_idx">
			<col>crmid</col>
		</index>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_seactivityrel" alter="true">
		<constraint>ADD CONSTRAINT fk_1_vtiger_seactivityrel FOREIGN KEY (activityid) REFERENCES vtiger_activity(activityid) ON DELETE CASCADE</constraint>
		<constraint>ADD CONSTRAINT fk_2_vtiger_seactivityrel FOREIGN KEY (crmid) REFERENCES vtiger_crmentity(crmid) ON DELETE CASCADE</constraint>
		<opt>Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
		<data>
		</data>
	</table>

	<table name="vtiger_seproductsrel">
		<field name="crmid" type="I" size="19">
			<key />
			<default value="0" />
		</field>
		<field name="productid" type="I" size="19">
			<key />
			<default value="0" />
		</field>
		<field name="setype" type="C" size="30">
			<notnull />
		</field>
		<field name="quantity" type="I" size="19">
			<default value="1" />
		</field>
Prasad's avatar
Prasad committed

		<index name="seproductsrel_productid_idx">
			<col>productid</col>
		</index>
		<index name="seproductrel_crmid_idx">
			<col>crmid</col>
		</index>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_seproductsrel" alter="true">
		<constraint>ADD CONSTRAINT fk_1_vtiger_seproductsrel FOREIGN KEY (crmid) REFERENCES vtiger_crmentity(crmid) ON DELETE CASCADE</constraint>
		<constraint>ADD CONSTRAINT fk_2_vtiger_seproductsrel 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_seticketsrel">
		<field name="crmid" type="I" size="19">
			<key />
			<default value="0" />
		</field>
		<field name="ticketid" type="I" size="19">
			<key />
			<default value="0" />
		</field>

		<index name="seticketsrel_crmid_idx">
			<col>crmid</col>
		</index>
		<index name="seticketsrel_ticketid_idx">
			<col>ticketid</col>
		</index>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_seticketsrel" alter="true">
		<constraint>ADD CONSTRAINT fk_1_vtiger_seticketsrel FOREIGN KEY (crmid) REFERENCES vtiger_crmentity(crmid) ON DELETE CASCADE</constraint>
		<constraint>ADD CONSTRAINT fk_2_vtiger_seticketsrel 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_import_maps">
		<field name="id" type="I" size="19">
			<key />
			<autoincrement />
		</field>
		<field name="name" type="C" size="36">
			<notnull />
		</field>
		<field name="module" type="C" size="36">
			<notnull />
		</field>
		<field name="content" type="B" />
		<field name="has_header" type="I" size="1">
			<notnull />
			<default value="1" />
		</field>
		<field name="deleted" type="I" size="1">
			<notnull />
			<default value="0" />
		</field>
		<field name="date_entered" type="T">
			<notnull />
			<deftimestamp />
		</field>
		<field name="date_modified" type="T">
Prasad's avatar
Prasad committed
			<!-- Troublesome with STRICT_TRANS_TABLE mode depends on MySQL 5.5 or 5.6+ -->
Prasad's avatar
Prasad committed
			<notnull />
			<deftimestamp />
Prasad's avatar
Prasad committed
		</field>
		<field name="assigned_user_id" type="C" size="36" />
		<field name="is_published" type="C" size="3">
			<notnull />
			<default value="no" />
		</field>
		<index name="import_maps_assigned_user_id_module_name_deleted_idx">
			<col>assigned_user_id</col>
			<col>module</col>
			<col>name</col>
			<col>deleted</col>
		</index>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_systems">
		<field name="id" type="I" size="19">
			<key />
		</field>
		<field name="server" type="C" size="100" />
		<field name="server_port" type="I" size="19" />
		<field name="server_username" type="C" size="100" />
		<field name="server_password" type="C" size="255" />
Prasad's avatar
Prasad committed
		<field name="server_type" type="C" size="20" />
		<field name="smtp_auth" type="C" size="5" />
		<field name="server_path" type="C" size="256" />
		<field name="from_email_field" type="C" size="50" />
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_currency_info">
		<field name="id" type="I" >
			<key />
			<autoincrement />

		</field>
		<field name="currency_name" type="C" size="100" />
		<field name="currency_code" type="C" size="100" />
		<field name="currency_symbol" type="C" size="30" />
		<field name="conversion_rate" type="N" size="10.3" />
		<field name="currency_status" type="C" size="25" />
		<field name="defaultid" type="C" size="10">
			<notnull />
			<default value="0" />
		</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_defaultcv">
		<field name="tabid" type="I" size="19">
			<key />
		</field>
		<field name="defaultviewname" type="C" size="50">
			<notnull />
		</field>
		<field name="query" type="X" />
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

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

	<table name="vtiger_emailtemplates">
		<field name="foldername" type="C" size="100" />
		<field name="templatename" type="C" size="100" />
		<field name="templatepath" type="C" size="100" />
Prasad's avatar
Prasad committed
		<field name="subject" type="C" size="100" />
		<field name="description" type="X" />
		<field name="body" type="X" />
		<field name="deleted" type="I" size="1">
			<notnull />
			<default value="0" />
		</field>
		<field name="templateid" type="I" size="19">
			<key />
			<autoincrement />
		</field>
		<field name="systemtemplate" type="I" size="1">
			<notnull />
			<default value="0" />
		</field>
		<field name="module" type="C" size="100" />
Prasad's avatar
Prasad committed

		<index name="emailtemplates_foldernamd_templatename_subject_idx">
			<col>foldername</col>
			<col>templatename</col>
			<col>subject</col>
		</index>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_faq">
		<field name="id" type="I" size="11">
			<key />
			<autoincrement />
		</field>
		<field name="faq_no" type="C" size="100">
			<notnull />
			<unique />
		</field>
		<field name="product_id" type="C" size="100" />
		<field name="question" type="X">
			<notnull />
		</field>
		<field name="answer" type="X" />
		<field name="category" type="C" size="200">
			<notnull />
		</field>
		<field name="status" type="C" size="200">
			<notnull />
		</field>

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

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

	<table name="vtiger_faqcomments">
		<field name="commentid" type="I" size="19">
			<key />
			<autoincrement />
		</field>
		<field name="faqid" type="I" size="19">
		</field>
		<field name="comments" type="X" />
		<field name="createdtime" type="T">
			<notnull />
		</field>

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

	<table name="vtiger_faqcomments" alter="true">
		<constraint>ADD CONSTRAINT fk_1_vtiger_faqcomments 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>

	<table name="vtiger_loginhistory">
		<field name="login_id" type="I" size="11">
			<key />
			<autoincrement />
		</field>
		<field name="user_name" type="C" size="25">
			<notnull />
		</field>
		<field name="user_ip" type="C" size="25">
			<notnull />
		</field>
		<field name="logout_time" type="T">
			<deftimestamp />
		</field>
		<field name="login_time" type="T">
Satish's avatar
Satish committed
			<!-- Troublesome with STRICT_TRANS_TABLE mode depends on MySQL 5.5 or 5.6+ -->
			<!--
				<deftimestamp />
			-->
Prasad's avatar
Prasad committed
		</field>
		<field name="status" type="C" size="25" />
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_senotesrel">
		<field name="crmid" type="I" size="19">
			<key />
			<default value="0" />
		</field>
		<field name="notesid" type="I" size="19">
			<key />
			<default value="0" />
		</field>

		<index name="senotesrel_notesid_idx">
			<col>notesid</col>
		</index>
		<index name="senotesrel_crmid_idx">