Skip to content
Snippets Groups Projects
DatabaseSchema.xml 209 KiB
Newer Older
Prasad's avatar
Prasad committed

		<index name="activityproductrel_activityid_idx">
			<col>activityid</col>
		</index>
		<index name="activityproductrel_productid_idx">
			<col>productid</col>
		</index>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_activityproductrel" alter="true">
		<constraint>ADD CONSTRAINT fk_1_vtiger_activityproductrel FOREIGN KEY (activityid) REFERENCES vtiger_activity(activityid) ON DELETE CASCADE</constraint>
		<constraint>ADD CONSTRAINT fk_2_vtiger_activityproductrel 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_relatedlists">
		<field name="relation_id" type="I" size="19">
			<key />
		</field>
		<field name="tabid" type="I" size="10" />
		<field name="related_tabid" type="I" size="10" />
		<field name="name" type="C" size="100" />
		<field name="sequence" type="I" size="10" />
		<field name="label" type="C" size="100" />
		<field name="presence" type="I" size="10">
			<notnull />
			<default value="0" />
		</field>
		<field name="actions" type="C" size="50">
			<notnull />
			<default value="" />
		</field>
		<field name="relationfieldid" type="I" size="19" />
		<field name="source" type="C" size="25" />
		<field name="relationtype" type="C" size="10" />
Prasad's avatar
Prasad committed

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

	<table name="vtiger_rss">
		<field name="rssid" type="I" size="19">
			<key />
		</field>
		<field name="rssurl" type="C" size="200">
			<notnull />
			<default value="" />
		</field>
		<field name="rsstitle" type="C" size="200" />
		<field name="rsstype" type="I" size="10">
			<default value="0" />
		</field>
		<field name="starred" type="I" size="1">
			<default value="0" />
		</field>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_vendorcf">
		<field name="vendorid" 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_vendorcf" alter="true">
		<constraint>ADD CONSTRAINT fk_1_vtiger_vendorcf 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_pricebook">
		<field name="pricebookid" type="I" size="19">
			<key />
			<notnull />
			<default value="0" />
		</field>
		<field name="pricebook_no" type="C" size="100">
			<notnull />
			<unique />
		</field>
		<field name="bookname" type="C" size="100" />
		<field name="active" type="I" size="1" />
		<field name="currency_id" type="I" size="19">
			<notnull />
			<default value="1" />
		</field>

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

	<table name="vtiger_pricebook" alter="true">
		<constraint>ADD CONSTRAINT fk_1_vtiger_pricebook FOREIGN KEY (pricebookid) 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_pricebookcf">
		<field name="pricebookid" 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_pricebookcf" alter="true">
		<constraint>ADD CONSTRAINT fk_1_vtiger_pricebookcf FOREIGN KEY (pricebookid) REFERENCES vtiger_pricebook(pricebookid) ON DELETE CASCADE</constraint>
		<opt>Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
		<data>
		</data>
	</table>

	<table name="vtiger_pricebookproductrel">
		<field name="pricebookid" type="I" size="19">
			<key />
		</field>
		<field name="productid" type="I" size="19">
			<key />
		</field>
		<field name="listprice" type="N" size="25.3" />
		<field name="usedcurrency" type="I" size="11">
			<notnull />
			<default value="1" />
		</field>

		<index name="pricebookproductrel_pricebookid_idx">
			<col>pricebookid</col>
		</index>
		<index name="pricebookproductrel_productid_idx">
			<col>productid</col>
		</index>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

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

	<table name="vtiger_mail_accounts">
		<field name="account_id" type="I" size="11">
			<key />
		</field>
		<field name="user_id" type="I" size="11">
			<notnull />
		</field>
		<field name="display_name" type="C" size="50" />
		<field name="mail_id" type="C" size="50" />
		<field name="account_name" type="C" size="50" />
		<field name="mail_protocol" type="C" size="20" />
		<field name="mail_username" type="C" size="50">
			<notnull />
		</field>
		<field name="mail_password" type="C" size="250">
			<notnull />
		</field>
		<field name="mail_servername" type="C" size="50" />
		<field name="box_refresh" type="I" size="10" />
		<field name="mails_per_page" type="I" size="10" />
		<field name="ssltype" type="C" size="50" />
		<field name="sslmeth" type="C" size="50" />
		<field name="int_mailer" type="I" size="1">
			<default value="0" />
		</field>
		<field name="status" type="C" size="10" />
		<field name="set_default" type="I" size="2" />
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_quotes">
		<field name="quoteid" 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>
		<field name="quotestage" type="C" size="200" />
		<field name="validtill" type="D" />
		<field name="contactid" type="I" size="19">
		</field>
		<field name="quote_no" type="C" size="100" />
		<field name="subtotal" type="N" size="25.3" />
		<field name="carrier" type="C" size='200' />
		<field name="shipping" type="C" size="100" />
		<field name="inventorymanager" type="I" size="19" />
		<field name="type" type="C" size="100" />
		<field name="adjustment" type="N" size="25.3" />
		<field name="total" 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="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="compound_taxes_info" type="X" />
Prasad's avatar
Prasad committed
		<index name="quote_quotestage_idx">
			<col>quotestage</col>
		</index>
		<index name="quotes_potentialid_idx">
			<col>potentialid</col>
		</index>
		<index name="quotes_contactid_idx">
			<col>contactid</col>
		</index>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_quotes" alter="true">
		<constraint>ADD CONSTRAINT fk_1_vtiger_quotes FOREIGN KEY (contactid) REFERENCES vtiger_contactdetails(contactid) ON DELETE CASCADE</constraint>
		<constraint>ADD CONSTRAINT fk_2_vtiger_quotes FOREIGN KEY (quoteid) REFERENCES vtiger_crmentity(crmid) ON DELETE CASCADE</constraint>
		<constraint>ADD CONSTRAINT fk_3_vtiger_quotes 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_quotesbillads">
		<field name="quotebilladdressid" 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_quotesbillads" alter="true">
		<constraint>ADD CONSTRAINT fk_1_vtiger_quotesbillads FOREIGN KEY (quotebilladdressid) REFERENCES vtiger_quotes(quoteid) ON DELETE CASCADE</constraint>
		<opt>Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
		<data>
		</data>
	</table>

	<table name="vtiger_quotesshipads">
		<field name="quoteshipaddressid" 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_quotesshipads" alter="true">
		<constraint>ADD CONSTRAINT fk_1_vtiger_quotesshipads FOREIGN KEY (quoteshipaddressid) REFERENCES vtiger_quotes(quoteid) ON DELETE CASCADE</constraint>
		<opt>Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
		<data>
		</data>
	</table>

	<table name="vtiger_quotescf">
		<field name="quoteid" 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_quotescf" alter="true">
		<constraint>ADD CONSTRAINT fk_1_vtiger_quotescf FOREIGN KEY (quoteid) REFERENCES vtiger_quotes(quoteid) ON DELETE CASCADE</constraint>
		<opt>Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
		<data>
		</data>
	</table>

	<table name="vtiger_purchaseorder">
		<field name="purchaseorderid" type="I" size="19">
			<key />
			<notnull />
			<default value="0" />
		</field>
		<field name="subject" type="C" size="100" />
		<field name="quoteid" type="I" size="19">
		</field>
		<field name="vendorid" type="I" size="19">
		</field>
		<field name="requisition_no" type="C" size="100" />
		<field name="purchaseorder_no" type="C" size="100" />
		<field name="tracking_no" type="C" size="100" />
		<field name="contactid" type="I" size="19">
		</field>
		<field name="duedate" type="D" />
		<field name="carrier" 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="terms_conditions" type="X" />
		<field name="postatus" 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="compound_taxes_info" type="X" />
Prasad's avatar
Prasad committed

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

	<table name="vtiger_purchaseorder" alter="true">
		<constraint>ADD CONSTRAINT fk_1_vtiger_purchaseorder FOREIGN KEY (contactid) REFERENCES vtiger_contactdetails(contactid) ON DELETE CASCADE</constraint>
		<constraint>ADD CONSTRAINT fk_2_vtiger_purchaseorder FOREIGN KEY (purchaseorderid) REFERENCES vtiger_crmentity(crmid) ON DELETE CASCADE</constraint>
		<constraint>ADD CONSTRAINT fk_3_vtiger_purchaseorder FOREIGN KEY (quoteid) REFERENCES vtiger_quotes(quoteid) ON DELETE CASCADE</constraint>
		<constraint>ADD CONSTRAINT fk_4_vtiger_purchaseorder 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_pobillads">
		<field name="pobilladdressid" 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_pobillads" alter="true">
		<constraint>ADD CONSTRAINT fk_1_vtiger_pobillads FOREIGN KEY (pobilladdressid) REFERENCES vtiger_purchaseorder(purchaseorderid) ON DELETE CASCADE</constraint>
		<opt>Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
		<data>
		</data>
	</table>

	<table name="vtiger_poshipads">
		<field name="poshipaddressid" 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_poshipads" alter="true">
		<constraint>ADD CONSTRAINT fk_1_vtiger_poshipads FOREIGN KEY (poshipaddressid) REFERENCES vtiger_purchaseorder(purchaseorderid) ON DELETE CASCADE</constraint>
		<opt>Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
		<data>
		</data>
	</table>

	<table name="vtiger_purchaseordercf">
		<field name="purchaseorderid" 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_purchaseordercf" alter="true">
		<constraint>ADD CONSTRAINT fk_1_vtiger_purchaseordercf FOREIGN KEY (purchaseorderid) REFERENCES vtiger_purchaseorder(purchaseorderid) ON DELETE CASCADE</constraint>
		<opt>Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
		<data>
		</data>
	</table>


	<table name="vtiger_invoice">
		<field name="invoiceid" type="I" size="19">
			<key />
			<notnull />
			<default value="0" />
		</field>
		<field name="subject" type="C" size="100" />
		<field name="salesorderid" type="I" size="19">
		</field>
		<field name="customerno" type="C" size="100" />
		<field name="contactid" type="I" size="19" />
		<field name="notes" type="C" size="100" />
		<field name="invoicedate" type="D" />
		<field name="duedate" type="D" />
		<field name="invoiceterms" type="C" size="100" />
		<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="subtotal" type="N" size="25.3" />
		<field name="total" 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="shipping" type="C" size="100" />
		<field name="accountid" type="I" size="19" />
		<field name="terms_conditions" type="X" />
		<field name="purchaseorder" type="C" size='200' />
		<field name="invoicestatus" type="C" size='200' />
		<field name="invoice_no" type="C" size='100' >
			<default value="NULL" />
			<unique />
		</field>
		<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="compound_taxes_info" type="X" />
Prasad's avatar
Prasad committed
		<index name="invoice_purchaseorderid_idx">
			<col>invoiceid</col>
		</index>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_invoice" alter="true">
		<constraint>ADD CONSTRAINT fk_1_vtiger_invoice FOREIGN KEY (invoiceid) REFERENCES vtiger_crmentity(crmid) ON DELETE CASCADE</constraint>
		<constraint>ADD CONSTRAINT fk_2_vtiger_invoice 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_invoicebillads">
		<field name="invoicebilladdressid" 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_invoicebillads" alter="true">
		<constraint>ADD CONSTRAINT fk_1_vtiger_invoicebillads FOREIGN KEY (invoicebilladdressid) REFERENCES vtiger_invoice(invoiceid) ON DELETE CASCADE</constraint>
		<opt>Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
		<data>
		</data>
	</table>

	<table name="vtiger_invoiceshipads">
		<field name="invoiceshipaddressid" 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_invoiceshipads" alter="true">
		<constraint>ADD CONSTRAINT fk_1_vtiger_invoiceshipads FOREIGN KEY (invoiceshipaddressid) REFERENCES vtiger_invoice(invoiceid) ON DELETE CASCADE</constraint>
		<opt>Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
		<data>
		</data>
	</table>

	<table name="vtiger_invoicecf">
		<field name="invoiceid" 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_invoicecf" alter="true">
		<constraint>ADD CONSTRAINT fk_1_vtiger_invoicecf FOREIGN KEY (invoiceid) REFERENCES vtiger_invoice(invoiceid) ON DELETE CASCADE</constraint>
		<opt>Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
		<data>
		</data>
	</table>


	<table name="vtiger_activity_reminder">
		<field name="activity_id" type="I" size="11">
			<key />
			<notnull />
		</field>
		<field name="reminder_time" type="I" size="11">
			<notnull />
		</field>
		<field name="reminder_sent" type="I" size="2">
			<notnull />
		</field>
		<field name="recurringid" type="I" size="19">
			<key />
			<notnull />
		</field>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_customview">
		<field name="cvid" type="I" size="19">
			<key />
		</field>
		<field name="viewname" type="C" size="100">
			<notnull />
		</field>
		<field name="setdefault" type="I" size="1">
			<default value="0" />
		</field>
		<field name="setmetrics" type="I" size="1">
			<default value="0" />
		</field>
		<field name="entitytype" type="C" size="25">
			<notnull />
		</field>
		<field name="status" type="I" size="1">
			<default value="1" />
		</field>
		<field name="userid" type="I" size="19">
			<default value="1" />
		</field>
		<index name="customview_entitytype_idx">
			<col>entitytype</col>
		</index>

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

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

	<table name="vtiger_cvcolumnlist">
		<field name="cvid" type="I" size="19">
			<key />
			<notnull />
		</field>
		<field name="columnindex" type="I" size="11">
			<key />
			<notnull />
		</field>
		<field name="columnname" type="C" size="250">
			<default value="" />
		</field>

		<index name="cvcolumnlist_columnindex_idx">
			<col>columnindex</col>
		</index>
		<index name="cvcolumnlist_cvid_idx">
			<col>cvid</col>
		</index>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

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

	<table name="vtiger_cvstdfilter">
		<field name="cvid" type="I" size="19">
			<key />
		</field>
		<field name="columnname" type="C" size="250">
			<default value="" />
		</field>
		<field name="stdfilter" type="C" size="250">
			<default value="" />
		</field>
		<field name="startdate" type="D">
			<default value="NULL" />
		</field>
		<field name="enddate" type="D">
			<default value="NULL" />
		</field>

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

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

	<table name="vtiger_cvadvfilter">
		<field name="cvid" type="I" size="19">
			<key />
		</field>
		<field name="columnindex" type="I" size="11">
			<key />
			<notnull />
		</field>
		<field name="columnname" type="C" size="250">
			<default value="" />
		</field>
		<field name="comparator" type="C" size="10">
			<default value="" />
		</field>
		<field name="value" type="C" size="200">
			<default value="" />
		</field>
		<field name="groupid" type="I">
			<default value="1" />
		</field>
		<field name="column_condition" type="C" size="255">
			<default value="and" />
		</field>

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

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

	<table name="vtiger_customaction">
		<field name="cvid" type="I" size="19">
			<notnull />
		</field>
		<field name="subject" type="C" size="250">
			<notnull />
		</field>
		<field name="module" type="C" size="50">
			<notnull />
		</field>
		<field name="content" type="X">
			<default value="" />
		</field>

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

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

	<table name="vtiger_selectquery">
		<field name="queryid" type="I" size="19">
			<key />
		</field>
		<field name="startindex" type="I" size="19">
			<default value="0" />
		</field>
		<field name="numofobjects" type="I" size="19">
			<default value="0" />
		</field>

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

	<table name="vtiger_selectcolumn">
		<field name="queryid" type="I" size="19">
			<key />
		</field>
		<field name="columnindex" type="I" size="11">
			<key />
			<notnull />
			<default value="0" />
		</field>
		<field name="columnname" type="C" size="250">
			<default value="" />
		</field>

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

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

	<table name="vtiger_relcriteria">
		<field name="queryid" type="I" size="19">
			<key />
		</field>
		<field name="columnindex" type="I" size="11">
			<key />
			<notnull />
		</field>
		<field name="columnname" type="C" size="250">
			<default value="" />
		</field>
		<field name="comparator" type="C" size="10">
			<default value="" />
		</field>
		<field name="value" type="C" size="200">
			<default value="" />
		</field>
		<field name="groupid" type="I" size="11">
			<default value="1" />
		</field>
		<field name="column_condition" type="C" size="256">
			<default value="and" />
		</field>

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

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

	<table name="vtiger_reportfolder">
		<field name="folderid" type="I" size="19">
			<key />
			<autoincrement />
		</field>
		<field name="foldername" type="C" size="100">
			<notnull />
			<default value="" />
		</field>
		<field name="description" type="C" size="250">
			<default value="" />
		</field>
		<field name="state" type="C" size="50">
			<default value="SAVED" />
		</field>

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

	<table name="vtiger_report">
		<field name="reportid" type="I" size="19">
			<key />
		</field>
		<field name="folderid" type="I" size="19">
			<notnull />
		</field>
		<field name="reportname" type="C" size="100">
			<default value="" />
		</field>
		<field name="description" type="C" size="250">
			<default value="" />
		</field>
		<field name="reporttype" type="C" size="50">
			<default value="" />
		</field>
		<field name="queryid" type="I" size="19">
			<notnull />
			<default value="0" />
		</field>
		<field name="state" type="C" size="50">
			<default value="SAVED" />
		</field>
		<field name="customizable" type="I" size="1">
			<default value="1" />
		</field>
		<field name="category" type="I" size="11">
			<default value="1" />
		</field>
		<field name="owner" type="I" size="11">
			<default value="1" />
		</field>
		<field name="sharingtype" type="C" size="200">
			<default value="Private" />
		</field>

		<index name="report_queryid_idx">
			<col>queryid</col>
		</index>
		<index name="report_folderid_idx">
			<col>folderid</col>
		</index>
		<opt platform="mysql">Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
	</table>

	<table name="vtiger_report" alter="true">
		<constraint>ADD CONSTRAINT fk_1_vtiger_report FOREIGN KEY (folderid) REFERENCES vtiger_reportfolder (folderid) ON DELETE CASCADE</constraint>
		<constraint>ADD CONSTRAINT fk_2_vtiger_report FOREIGN KEY (queryid) REFERENCES vtiger_selectquery (queryid) ON DELETE CASCADE</constraint>
		<opt>Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
		<data>
		</data>
	</table>

	<table name="vtiger_reportmodules">
		<field name="reportmodulesid" type="I" size="19">
			<key />
		</field>
		<field name="primarymodule" type="C" size="50">
			<notnull />
			<default value="" />
		</field>
		<field name="secondarymodules" type="C" size="250">
			<default value="" />
		</field>

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

	<table name="vtiger_reportmodules" alter="true">
		<constraint>ADD CONSTRAINT fk_1_vtiger_reportmodules FOREIGN KEY (reportmodulesid) REFERENCES vtiger_report (reportid) ON DELETE CASCADE</constraint>
		<opt>Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
		<data>
		</data>
	</table>

	<table name="vtiger_reportsortcol">
		<field name="sortcolid" type="I" size="19">
			<key />
		</field>
		<field name="reportid" type="I" size="19">
			<key />
		</field>
		<field name="columnname" type="C" size="250">
			<default value="" />
		</field>
		<field name="sortorder" type="C" size="250">
			<default value="Asc" />
		</field>

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

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

	<table name="vtiger_reportdatefilter">
		<field name="datefilterid" type="I" size="19">
			<key />
		</field>
		<field name="datecolumnname" type="C" size="250">
			<default value="" />
		</field>
		<field name="datefilter" type="C" size="250">
			<default value="" />
		</field>
		<field name="startdate" type="D">
			<default value="NULL" />
		</field>
		<field name="enddate" type="D">
			<default value="NULL" />
		</field>

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

	<table name="vtiger_reportdatefilter" alter="true">
		<constraint>ADD CONSTRAINT fk_1_vtiger_reportdatefilter FOREIGN KEY (datefilterid) REFERENCES vtiger_report (reportid) ON DELETE CASCADE</constraint>
		<opt>Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
		<data>
		</data>
	</table>

	<table name="vtiger_reportsummary">
		<field name="reportsummaryid" type="I" size="19">
			<key />
		</field>
		<field name="summarytype" type="I" size="19">
			<key />
		</field>
		<field name="columnname" type="C" size="250">
			<key />
			<default value="" />
		</field>

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

	<table name="vtiger_reportsummary" alter="true">
		<constraint>ADD CONSTRAINT fk_1_vtiger_reportsummary FOREIGN KEY (reportsummaryid) REFERENCES vtiger_report (reportid) 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_reporttype">
		<field name="reportid" type="I" size="10">
			<key />
		</field>
		<field name="data" type="X" />
	</table>
	<table name="vtiger_reporttype" alter="true">
Prasad's avatar
Prasad committed
		<constraint>ADD CONSTRAINT fk_1_vtiger_reporttype FOREIGN KEY (reportid) REFERENCES vtiger_report (reportid) ON DELETE CASCADE</constraint>
		<opt>Engine=InnoDB DEFAULT CHARSET utf8</opt>
Prasad's avatar
Prasad committed
		<data>
		</data>
	</table>
Prasad's avatar
Prasad committed

Prasad's avatar
Prasad committed
	<table name="vtiger_usageunit">
		<field name="usageunitid" type="I" size="19">
			<key />
			<autoincrement />
		</field>
		<field name="usageunit" 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="usageunit_usageunit_idx">