[Vtigercrm-commits] [vtiger-commits] r5751 - /vtigercrm/branches/4.2/schema/DatabaseSchema.xml

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Fri May 5 02:45:27 EDT 2006


Author: allanbush
Date: Fri May  5 00:45:23 2006
New Revision: 5751

Log:
Reformated how foreign keys are created to reflect new adodb syntax.  Refs #757.

Also the formatting was cleaned up and a consitant naming scheme for indexes was choosen.

Modified:
    vtigercrm/branches/4.2/schema/DatabaseSchema.xml

Modified: vtigercrm/branches/4.2/schema/DatabaseSchema.xml
==============================================================================
--- vtigercrm/branches/4.2/schema/DatabaseSchema.xml (original)
+++ vtigercrm/branches/4.2/schema/DatabaseSchema.xml Fri May  5 00:45:23 2006
@@ -3,5388 +3,3833 @@
 
 	<table name="users">
 		<field name="id" type="I" >
-			<KEY/>
-		<AUTOINCREMENT/>
-
-		</field>
-		<field name="user_name" type="C" size="20"></field>
-		<field name="user_password" type="C" size="30"></field>
-		<field name="user_hash" type="C" size="32"></field>
-		<field name="first_name" type="C" size="30"></field>
-		<field name="last_name" type="C" size="30"></field>
-		<field name="reports_to_id" type="C" size="36"></field>
+			<key />
+			<autoincrement />
+		</field>
+		<field name="user_name" type="C" size="20" />
+		<field name="user_password" type="C" size="30" />
+		<field name="user_hash" type="C" size="32" />
+		<field name="first_name" type="C" size="30" />
+		<field name="last_name" type="C" size="30" />
+		<field name="reports_to_id" type="C" size="36" />
 		<field name="is_admin" type="C" size="3">
-			<DEFAULT value="0"/>
-		</field>
-		<field name="description" type="X"></field>
+			<default value="0" />
+		</field>
+		<field name="description" type="X" />
 		<field name="date_entered" type="T">
-			<NOTNULL/>
-			<DEFTIMESTAMP/>
+			<notnull />
+			<deftimestamp />
 		</field>
 		<field name="date_modified" type="T">
-			<NOTNULL/>
-			<DEFTIMESTAMP/>
-		</field>
-		<field name="modified_user_id" type="C" size="36">
-		</field>
-		<field name="title" type="C" size="50"></field>
-		<field name="department" type="C" size="50"></field>
-		<field name="phone_home" type="C" size="50"></field>
-		<field name="phone_mobile" type="C" size="50"></field>
-		<field name="phone_work" type="C" size="50"></field>
-		<field name="phone_other" type="C" size="50"></field>
-		<field name="phone_fax" type="C" size="50"></field>
-		<field name="email1" type="C" size="100"></field>
-		<field name="email2" type="C" size="100"></field>
-		<field name="yahoo_id" type="C" size="100"></field>
-		<field name="status" type="C" size="25"></field>
-		<field name="signature" type="C" size="250"></field>
-		<field name="address_street" type="C" size="150"></field>
-		<field name="address_city" type="C" size="100"></field>
-		<field name="address_state" type="C" size="100"></field>
-		<field name="address_country" type="C" size="25"></field>
-		<field name="address_postalcode" type="C" size="9"></field>
-		<field name="user_preferences" type="X"></field>
-		<field name="tz" type="C" size="30"></field>
-		<field name="holidays" type="C" size="60"></field>
-		<field name="namedays" type="C" size="60"></field>
-		<field name="workdays" type="C" size="30"></field>
-	 	<field name="weekstart" type="I" size="11"></field>
-		<field name="date_format" type="C" size="30"></field>
+			<notnull />
+			<deftimestamp />
+		</field>
+		<field name="modified_user_id" type="C" size="36" />
+		<field name="title" type="C" size="50" />
+		<field name="department" type="C" size="50" />
+		<field name="phone_home" type="C" size="50" />
+		<field name="phone_mobile" type="C" size="50" />
+		<field name="phone_work" type="C" size="50" />
+		<field name="phone_other" type="C" size="50" />
+		<field name="phone_fax" type="C" size="50" />
+		<field name="email1" type="C" size="100" />
+		<field name="email2" type="C" size="100" />
+		<field name="yahoo_id" type="C" size="100" />
+		<field name="status" type="C" size="25" />
+		<field name="signature" type="C" size="250" />
+		<field name="address_street" type="C" size="150" />
+		<field name="address_city" type="C" size="100" />
+		<field name="address_state" type="C" size="100" />
+		<field name="address_country" type="C" size="25" />
+		<field name="address_postalcode" type="C" size="9" />
+		<field name="user_preferences" type="X" />
+		<field name="tz" type="C" size="30" />
+		<field name="holidays" type="C" size="60" />
+		<field name="namedays" type="C" size="60" />
+		<field name="workdays" type="C" size="30" />
+		<field name="weekstart" type="I" size="11" />
+		<field name="date_format" type="C" size="30" />
 		<field name="deleted" type="I" size="1">
-			<NOTNULL/>
-			<DEFAULT value="0"/>
-		</field>
-	<opt>Type=InnoDB</opt>
-		<index name="idx_user_name">
+			<notnull />
+			<default value="0" />
+		</field>
+
+		<index name="user_user_name_idx">
 			<col>user_name</col>
 		</index>
-		<index name="user_password">
+		<index name="user_user_password_idx">
 			<col>user_password</col>
 		</index>
-		<data>
-
-		</data>
-	</table>
-
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="crmentity">
 		<field name="crmid" type="I" size="19">
-			<KEY/>
+			<key />
 		</field>
 		<field name="smcreatorid" type="I" size="19">
-			<NOTNULL/>
-			<DEFAULT value="0"/>
+			<notnull/>
+			<default value="0" />
 		</field>
 		<field name="smownerid" type="I" size="19">
-			<NOTNULL/>
-			<DEFAULT value="0"/>
+			<notnull />
+			<default value="0" />
 		</field>
 		<field name="modifiedby" type="I" size="19">
-			<NOTNULL/>
-			<DEFAULT value="0"/>
+			<notnull />
+			<default value="0" />
 		</field>
 		<field name="setype" type="C" size="30">
-			<NOTNULL/>
-		</field>
-		<field name="description" type="X"></field>
-		<field name="createdtime" type="T" >
-			<NOTNULL/>
+			<notnull />
+		</field>
+		<field name="description" type="X" />
+		<field name="createdtime" type="T">
+			<notnull />
 		</field>
 		<field name="modifiedtime" type="T">
-			<NOTNULL/>
-		</field>
-		<field name="viewedtime" type="T"></field>
-		<field name="status" type="C" size="50"></field>
+			<notnull />
+		</field>
+		<field name="viewedtime" type="T" />
+		<field name="status" type="C" size="50" />
 		<field name="version" type="I" size="19">
-			<NOTNULL/>
-			<DEFAULT value="0"/>
-		</field>
-		<field name="presence" type="I" size="1">
-			<DEFAULT value="1"/>
-		</field>
-
-	<field name="deleted" type="I" size="1">
-			<NOTNULL/>
-			<DEFAULT value="0"/>
-		</field>
-
-		<opt>Type=InnoDB</opt>
-                  <index name="crmentity_IDX0">
+			<notnull />
+			<default value="0" />
+		</field>
+		<field name="presence" type="I" size="1">
+			<default value="1" />
+		</field>
+
+		<field name="deleted" type="I" size="1">
+			<notnull />
+			<default value="0" />
+		</field>
+
+		<index name="crmentity_smcreatorid_idx">
 			<col>smcreatorid</col>
 		</index>
-		<opt>Type=InnoDB</opt>
-                    <index name="crmentity_IDX1">
+		<index name="crmentity_smownerid_idx">
 			<col>smownerid</col>
 		</index>
-		<opt>Type=InnoDB</opt>
-                     <index name="crmentity_IDX2">
+		<index name="crmentity_modifiedby_idx">
 			<col>modifiedby</col>
 		</index>
-		<index name="deleted">
+		<index name="crmentity_deleted_smownerid_idx">
 			<col>deleted</col>
 			<col>smownerid</col>
 		</index>
-		<index name="smownerid">
+		<index name="crmentity_smownerid_deleted_idx">
 			<col>smownerid</col>
 			<col>deleted</col>
 		</index>
-		<data>
-
-		</data>
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="tab">
 		<field name="tabid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
+			<key />
+			<default value="0" />
 		</field>
 		<field name="name" type="C" size="25">
-			<NOTNULL/>
+			<notnull />
 		</field>
 		<field name="presence" type="I" size="19">
-			<NOTNULL/>
-			<DEFAULT value="1"/>
-		</field>
-		<field name="tabsequence" type="I" size="10"></field>
+			<notnull />
+			<default value="1" />
+		</field>
+		<field name="tabsequence" type="I" size="10" />
 		<field name="tablabel" type="C" size="25">
-			<NOTNULL/>
-		</field>
-		<field name="modifiedby" type="I" size="19"></field>
-		<field name="modifiedtime" type="I" size="19"></field>
-		<field name="customized" type="I" size="1"></field>
-		<opt>Type=InnoDB</opt> <index name="Tab_UK0">
-			<UNIQUE/>
+			<notnull />
+		</field>
+		<field name="modifiedby" type="I" size="19" />
+		<field name="modifiedtime" type="I" size="19" />
+		<field name="customized" type="I" size="1" />
+
+		<index name="tab_name_idx">
 			<col>name</col>
-		</index>
-		<opt>Type=InnoDB</opt> <index name="Tab_IDX0">
+			<unique />
+		</index>
+		<index name="tab_modifiedby_idx">
 			<col>modifiedby</col>
 		</index>
-		<index name="tab_tabid">
+		<index name="tab_tabid_idx">
 			<col>tabid</col>
 		</index>
-		<data>
-
-		</data>
-	</table>
-
-
-              <table name="field">
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
+
+	<table name="field">
 		<field name="tabid" type="I" size="19">
-        			<NOTNULL/>
-			</field>
+			<notnull />
+		</field>
 		<field name="fieldid" type="I" size="19">
-                    <KEY/>
-                     <AUTOINCREMENT/></field>
-
-             <field name="columnname" type="C" size="30">
-			<NOTNULL/>
+			<key />
+			<autoincrement />
+			<constraint>REFERENCES tab(tabid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="columnname" type="C" size="30">
+			<notnull />
 		</field>
 		<field name="tablename" type="C" size="50">
-			<NOTNULL/>
+			<notnull />
 		</field>
 		<field name="generatedtype" type="I" size="19">
-			<NOTNULL/>
-			<DEFAULT value="0"/>
+			<notnull />
+			<default value="0" />
 		</field>
 		<field name="uitype" type="C" size="30">
-			<NOTNULL/>
+			<notnull />
 		</field>
 		<field name="fieldname" type="C" size="50">
-			<NOTNULL/>
-		</field>
-
+			<notnull />
+		</field>
 		<field name="fieldlabel" type="C" size="50">
-			<NOTNULL/>
+			<notnull />
 		</field>
 		<field name="readonly" type="I" size="1">
-			<NOTNULL/>
-		</field>
-
+			<notnull />
+		</field>
 		<field name="presence" type="I" size="19">
-			<NOTNULL/>
-			<DEFAULT value="1"/>
+			<notnull />
+			<default value="1" />
 		</field>
 		<field name="selected" type="I" size="1">
-			<NOTNULL/>
-		</field>
-		<field name="maximumlength" type="I" size="19">
-			</field>
-		<field name="sequence" type="I" size="19">
-                    </field>
-		<field name="block" type="I" size="19">
-			</field>
-		<field name="displaytype" type="I" size="19">
-			</field>
-
-		<field name="typeofdata" type="C" size="100">
-		</field>
-		<index name="Field_IDX0">
+			<notnull />
+		</field>
+		<field name="maximumlength" type="I" size="19" />
+		<field name="sequence" type="I" size="19" />
+		<field name="block" type="I" size="19" />
+		<field name="displaytype" type="I" size="19" />
+		<field name="typeofdata" type="C" size="100" />
+
+		<index name="field_tabid_idx">
 			<col>tabid</col>
 		</index>
-		<index name="fieldname">
+		<index name="field_fieldname_idx">
 			<col>fieldname</col>
 		</index>
-		<index name="field_tabid">
+		<index name="field_tabid_block_displaytype_idx">
 			<col>tabid</col>
 			<col>block</col>
 			<col>displaytype</col>
 		</index>
-                <opt>Type=InnoDB</opt>
-		<data>
-		</data>
-	</table>
-
-
-
-	<table name="field" alter="true">
-
-		<constraint>ADD CONSTRAINT fk_pi FOREIGN KEY (tabid) REFERENCES tab(tabid) ON DELETE CASCADE </constraint>
-		<opt>Type=InnoDB</opt>
-		<data>
-		</data>
-	</table>
-
-
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="account">
 		<field name="accountid" type="I" size="19">
-			<KEY/>
-                    <NOTNULL/>
-			<DEFAULT value="0"/>
+			<key />
+			<notnull />
+			<default value="0" />
+			<constraint>REFERENCES crmentity(crmid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="accountname" type="C" size="100">
-			<UNIQUE/>
-			<NOTNULL/>
+			<unique />
+			<notnull />
 		</field>
 		<field name="parentid" type="I" size="19">
-                        <DEFAULT value="0"/>
-                </field>
-		<field name="account_type" type="C" size="50"></field>
-		<field name="industry" type="C" size="50"></field>
+			<default value="0" />
+		</field>
+		<field name="account_type" type="C" size="50" />
+		<field name="industry" type="C" size="50" />
 		<field name="annualrevenue" type="I" size="19">
-			<DEFAULT value="0"/>
-		</field>
-		<field name="rating" type="C" size="50"></field>
-		<field name="ownership" type="C" size="50"></field>
+			<default value="0" />
+		</field>
+		<field name="rating" type="C" size="50" />
+		<field name="ownership" type="C" size="50" />
 		<field name="siccode" type="I" size="10">
-			<DEFAULT value="0"/>
-		</field>
-		<field name="tickersymbol" type="C" size="30"></field>
-		<field name="phone" type="C" size="30"></field>
-		<field name="otherphone" type="C" size="30"></field>
-		<field name="email1" type="C" size="100"></field>
-		<field name="email2" type="C" size="100"></field>
-		<field name="website" type="C" size="30"></field>
-		<field name="fax" type="C" size="30"></field>
+			<default value="0" />
+		</field>
+		<field name="tickersymbol" type="C" size="30" />
+		<field name="phone" type="C" size="30" />
+		<field name="otherphone" type="C" size="30" />
+		<field name="email1" type="C" size="100" />
+		<field name="email2" type="C" size="100" />
+		<field name="website" type="C" size="30" />
+		<field name="fax" type="C" size="30" />
 		<field name="employees" type="I" size="10">
-			<DEFAULT value="0"/>
-		</field>
-		<index name="account_type">
+			<default value="0" />
+		</field>
+
+		<index name="account_account_type_idx">
 			<col>account_type</col>
 		</index>
-		
-                  
-<opt>Type=InnoDB</opt>
-		<data>
-		</data>
-	</table>
-
-
-
-	<table name="account" alter="true">
-	<constraint>ADD CONSTRAINT fk_Account FOREIGN KEY (accountid) REFERENCES crmentity(crmid) ON DELETE CASCADE</constraint>
-		<opt>Type=InnoDB</opt>
-		<data>
-		</data>
-	</table>
-
-
-
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="accountbillads">
 		<field name="accountaddressid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
-		</field>
-		<field name="city" type="C" size="30"></field>
-		<field name="code" type="C" size="30"></field>
-		<field name="country" type="C" size="30"></field>
-		<field name="state" type="C" size="30"></field>
-		<field name="street" type="C" size="250"></field>
-		<opt>Type=InnoDB</opt> 
-		<data>
-		</data>
-	</table>
-
-
-	<table name="accountbillads" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_AccountBillAds FOREIGN KEY (accountaddressid) REFERENCES account(accountid) ON DELETE CASCADE</constraint>
-
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
+			<key />
+			<default value="0" />
+			<constraint>REFERENCES account(accountid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="city" type="C" size="30" />
+		<field name="code" type="C" size="30" />
+		<field name="country" type="C" size="30" />
+		<field name="state" type="C" size="30" />
+		<field name="street" type="C" size="250" />
+
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="accountshipads">
 		<field name="accountaddressid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
-		</field>
-		<field name="city" type="C" size="30"></field>
-		<field name="code" type="C" size="30"></field>
-		<field name="country" type="C" size="30"></field>
-		<field name="state" type="C" size="30"></field>
-		<field name="street" type="C" size="250"></field>
-		<opt>Type=InnoDB</opt> 
-		<data>
-		</data>
-	</table>
-
-	<table name="accountshipads" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_AccountShipAds FOREIGN KEY (accountaddressid) REFERENCES account(accountid)  ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
+			<key />
+			<default value="0" />
+			<constraint>REFERENCES account(accountid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="city" type="C" size="30" />
+		<field name="code" type="C" size="30" />
+		<field name="country" type="C" size="30" />
+		<field name="state" type="C" size="30" />
+		<field name="street" type="C" size="250" />
+
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="accountscf">
 		<field name="accountid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
-		</field>
-		<opt>Type=InnoDB</opt> 
-		<data>
-		</data>
-	</table>
-
-
-	<table name="accountscf" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_AccountsCF FOREIGN KEY (accountid) REFERENCES account(accountid)  ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
+			<key />
+			<default value="0" />
+			<constraint>REFERENCES account(accountid) ON DELETE CASCADE</constraint>
+		</field>
+
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="contactdetails">
 		<field name="contactid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
-		</field>
-		<field name="accountid" type="I" size="19"></field>
+			<key />
+			<default value="0" />
+			<constraint>REFERENCES crmentity(crmid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="accountid" type="I" size="19" />
 		<field name="salutation" type="C" size="50">
-			<DEFAULT value="Mr"/>
-		</field>
-		<field name="firstname" type="C" size="40"></field>
+			<default value="Mr" />
+		</field>
+		<field name="firstname" type="C" size="40" />
 		<field name="lastname" type="C" size="80">
-			<NOTNULL/>
-		</field>
-		<field name="email" type="C" size="100"></field>
-		<field name="phone" type="C" size="50"></field>
-		<field name="mobile" type="C" size="50"></field>
-		<field name="title" type="C" size="50"></field>
-		<field name="department" type="C" size="30"></field>
-		<field name="fax" type="C" size="50"></field>
-		<field name="reportsto" type="C" size="30"></field>
-		<field name="training" type="C" size="50"></field>
-		<field name="usertype" type="C" size="50"></field>
-		<field name="contacttype" type="C" size="50"></field>
-                <field name="otheremail" type="C" size="100"></field>
-                <field name="yahooid" type="C" size="100"></field>
-                <field name="donotcall" type="C" size="3"></field>
-                <field name="emailoptout" type="C" size="3">
-			<DEFAULT value="0"/>
+			<notnull />
+		</field>
+		<field name="email" type="C" size="100" />
+		<field name="phone" type="C" size="50" />
+		<field name="mobile" type="C" size="50" />
+		<field name="title" type="C" size="50" />
+		<field name="department" type="C" size="30" />
+		<field name="fax" type="C" size="50" />
+		<field name="reportsto" type="C" size="30" />
+		<field name="training" type="C" size="50" />
+		<field name="usertype" type="C" size="50" />
+		<field name="contacttype" type="C" size="50" />
+		<field name="otheremail" type="C" size="100" />
+		<field name="yahooid" type="C" size="100" />
+		<field name="donotcall" type="C" size="3" />
+		<field name="emailoptout" type="C" size="3">
+			<default value="0" />
 		</field>
 		<field name="currency" type="C" size="20">
-			<DEFAULT value="Dollars"/>
-		</field>
-
-             		 
-		 <index name="ContactDetails_IDX1">
+			<default value="Dollars" />
+		</field>
+
+		<index name="contactdetails_accountid_idx">
 			<col>accountid</col>
 		</index>
-<opt>Type=InnoDB</opt>
-		<data>
-		</data>
-	</table>
-
-
-	<table name="contactdetails" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_ContactDetails FOREIGN KEY (contactid) REFERENCES crmentity(crmid)  ON DELETE CASCADE </constraint>
-
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="contactsubdetails">
 		<field name="contactsubscriptionid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
-		</field>
-		<field name="homephone" type="C" size="50"></field>
-		<field name="otherphone" type="C" size="50"></field>
-		<field name="assistant" type="C" size="30"></field>
-		<field name="assistantphone" type="C" size="50"></field>
-		<field name="birthday" type="D"></field>
+			<key />
+			<default value="0" />
+			<constraint>REFERENCES contactdetails(contactid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="homephone" type="C" size="50" />
+		<field name="otherphone" type="C" size="50" />
+		<field name="assistant" type="C" size="30" />
+		<field name="assistantphone" type="C" size="50" />
+		<field name="birthday" type="D" />
 		<field name="laststayintouchrequest" type="I" size="30">
-			<DEFAULT value="0"/>
+			<default value="0" />
 		</field>
 		<field name="laststayintouchsavedate" type="I" size="19">
-			<DEFAULT value="0"/>
-		</field>
-		<field name="leadsource" type="C" size="50"></field>
-		<opt>Type=InnoDB</opt> 
-		<data>
-		</data>
-	</table>
-
-	<table name="contactsubdetails" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_ContactSubDetails FOREIGN KEY (contactsubscriptionid) REFERENCES contactdetails(contactid)  ON DELETE CASCADE </constraint>
-
-		<opt>Type=InnoDB</opt>
-
-		<data>
-		</data>
-	</table>
-
-
+			<default value="0" />
+		</field>
+		<field name="leadsource" type="C" size="50" />
+
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="contactaddress">
 		<field name="contactaddressid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
-		</field>
-		<field name="mailingcity" type="C" size="40"></field>
-		<field name="mailingstreet" type="C" size="250"></field>
-		<field name="mailingcountry" type="C" size="40"></field>
-		<field name="othercountry" type="C" size="30"></field>
-		<field name="mailingstate" type="C" size="30"></field>
-		<field name="othercity" type="C" size="40"></field>
-		<field name="otherstate" type="C" size="50"></field>
-		<field name="mailingzip" type="C" size="30"></field>
-		<field name="otherzip" type="C" size="30"></field>
-		<field name="otherstreet" type="C" size="250"></field>
-		<opt>Type=InnoDB</opt>
-		<data>
-		</data>
-	</table>
-
-	<table name="contactaddress" alter="true">
-
-		<constraint>ADD CONSTRAINT fk_ContactAddress FOREIGN KEY (contactaddressid) REFERENCES contactdetails(contactid)  ON DELETE CASCADE </constraint>
-
-		<opt>Type=InnoDB</opt>
-
-		<data>
-		</data>
+			<key />
+			<default value="0" />
+			<constraint>REFERENCES contactdetails(contactid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="mailingcity" type="C" size="40" />
+		<field name="mailingstreet" type="C" size="250" />
+		<field name="mailingcountry" type="C" size="40" />
+		<field name="othercountry" type="C" size="30" />
+		<field name="mailingstate" type="C" size="30" />
+		<field name="othercity" type="C" size="40" />
+		<field name="otherstate" type="C" size="50" />
+		<field name="mailingzip" type="C" size="30" />
+		<field name="otherzip" type="C" size="30" />
+		<field name="otherstreet" type="C" size="250" />
+
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="contactscf">
 		<field name="contactid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
-		</field>
-		<opt>Type=InnoDB</opt>
-		<data>
-		</data>
-	</table>
-
-
-	<table name="contactscf" alter="true">
-
-		<constraint>ADD CONSTRAINT fk_ContactsCF FOREIGN KEY (contactid) REFERENCES contactdetails(contactid)  ON DELETE CASCADE </constraint>
-
-		<opt>Type=InnoDB</opt>
-
-		<data>
-		</data>
+			<key />
+			<default value="0" />
+			<constraint>REFERENCES contactdetails(contactid) ON DELETE CASCADE</constraint>
+		</field>
+
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="PortalInfo">
 		<field name="id" type="I" size="11">
-                        <KEY/>
-		</field>
-		<field name="user_name" type="C" size="50"></field>
-		<field name="user_password" type="C" size="30"></field>
-		<field name="type" type="C" size="5"></field>
+			<key />
+			<constraint>REFERENCES contactdetails(contactid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="user_name" type="C" size="50" />
+		<field name="user_password" type="C" size="30" />
+		<field name="type" type="C" size="5" />
 		<field name="last_login_time" type="T">
-                        <NOTNULL/>
-                </field>
+			<notnull />
+		</field>
 		<field name="login_time" type="T">
-                        <NOTNULL/>
-                </field>
-                <field name="logout_time" type="T">
-                        <NOTNULL/>
-                </field>
-		<field name="isactive" type="I" size="1"></field>
-	</table>
-	<table name="PortalInfo" alter="true">
-
-                <constraint>ADD CONSTRAINT fk_PortalInfo FOREIGN KEY (id) REFERENCES contactdetails(contactid)  ON DELETE CASCADE </constraint>
-
-                <opt>Type=InnoDB</opt>
-
-                <data>
-                </data>
-        </table>
+			<notnull />
+		</field>
+		<field name="logout_time" type="T">
+			<notnull />
+		</field>
+		<field name="isactive" type="I" size="1" />
+	</table>
 
 	<table name="CustomerDetails">
 		<field name="customerid" type="I" size="19">
-			<KEY/>
-                </field>
-		<field name="portal" type="C" size="3"></field>
-		<field name="support_start_date" type="D"></field>
-		<field name="support_end_date" type="D"></field>
-	</table>
-	<table name="CustomerDetails" alter="true">
-
-                <constraint>ADD CONSTRAINT fk_CustomerDetails FOREIGN KEY (customerid) REFERENCES contactdetails(contactid) ON DELETE CASCADE </constraint>
-
-                <opt>Type=InnoDB</opt>
-
-                <data>
-                </data>
-        </table>
+			<key />
+			<constraint>REFERENCES contactdetails(contactid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="portal" type="C" size="3" />
+		<field name="support_start_date" type="D" />
+		<field name="support_end_date" type="D" />
+	</table>
 
 	<table name="leaddetails">
 		<field name="leadid" type="I" size="19">
-			<KEY/>
-		</field>
-		<field name="email" type="C" size="100"></field>
-		<field name="interest" type="C" size="50"></field>
-		<field name="firstname" type="C" size="40"></field>
-		<field name="salutation" type="C" size="10"></field>
+			<key />
+			<constraint>REFERENCES crmentity(crmid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="email" type="C" size="100" />
+		<field name="interest" type="C" size="50" />
+		<field name="firstname" type="C" size="40" />
+		<field name="salutation" type="C" size="10" />
 		<field name="lastname" type="C" size="80">
-			<NOTNULL/>
+			<notnull />
 		</field>
 		<field name="company" type="C" size="100">
-			<NOTNULL/>
+			<notnull />
 		</field>
 		<field name="annualrevenue" type="I" size="19">
-			<DEFAULT value="0"/>
-		</field>
-		<field name="industry" type="C" size="50"></field>
-		<field name="campaign" type="C" size="30"></field>
-		<field name="rating" type="C" size="50"></field>
-		<field name="leadstatus" type="C" size="50"></field>
-		<field name="leadsource" type="C" size="50"></field>
+			<default value="0" />
+		</field>
+		<field name="industry" type="C" size="50" />
+		<field name="campaign" type="C" size="30" />
+		<field name="rating" type="C" size="50" />
+		<field name="leadstatus" type="C" size="50" />
+		<field name="leadsource" type="C" size="50" />
 		<field name="converted" type="I" size="1">
-			<DEFAULT value="0"/>
+			<default value="0" />
 		</field>
 		<field name="designation" type="C" size="50">
-			<DEFAULT value="SalesMan"/>
-		</field>
-		<field name="licencekeystatus" type="C" size="50"></field>
-		<field name="space" type="C" size="250"></field>
-		<field name="comments" type="X"></field>
-		<field name="priority" type="C" size="50"></field>
-		<field name="demorequest" type="C" size="50"></field>
-		<field name="partnercontact" type="C" size="50"></field>
-		<field name="productversion" type="C" size="20"></field>
-		<field name="product" type="C" size="50"></field>
-		<field name="maildate" type="D"></field>
-		<field name="nextstepdate" type="D"></field>
-		<field name="fundingsituation" type="C" size="50"></field>
-		<field name="purpose" type="C" size="50"></field>
-		<field name="evaluationstatus" type="C" size="50"></field>
-		<field name="transferdate" type="D"></field>
-		<field name="revenuetype" type="C" size="50"></field>
-		<field name="noofemployees" type="C" size="50"></field>
-                <field name="yahooid" type="C" size="100"></field>
+			<default value="SalesMan" />
+		</field>
+		<field name="licencekeystatus" type="C" size="50" />
+		<field name="space" type="C" size="250" />
+		<field name="comments" type="X" />
+		<field name="priority" type="C" size="50" />
+		<field name="demorequest" type="C" size="50" />
+		<field name="partnercontact" type="C" size="50" />
+		<field name="productversion" type="C" size="20" />
+		<field name="product" type="C" size="50" />
+		<field name="maildate" type="D" />
+		<field name="nextstepdate" type="D" />
+		<field name="fundingsituation" type="C" size="50" />
+		<field name="purpose" type="C" size="50" />
+		<field name="evaluationstatus" type="C" size="50" />
+		<field name="transferdate" type="D" />
+		<field name="revenuetype" type="C" size="50" />
+		<field name="noofemployees" type="C" size="50" />
+		<field name="yahooid" type="C" size="100" />
 		<field name="assignleadchk" type="I" size="1">
-			<DEFAULT value="0"/>
-		</field>
-		<index name="converted">
+			<default value="0" />
+		</field>
+
+		<index name="leaddetails_converted_leadstatus_idx">
 			<col>converted</col>
 			<col>leadstatus</col>
 		</index>
-		<opt>Type=InnoDB</opt>
-		<data>
-		</data>
-	</table>
-	<table name="leaddetails" alter="true">
-
-		<constraint>ADD CONSTRAINT fk_LeadDetails FOREIGN KEY (leadid) REFERENCES crmentity(crmid)  ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="leadsubdetails">
 		<field name="leadsubscriptionid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
+			<key />
+			<default value="0" />
+			<constraint>REFERENCES leaddetails(leadid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="currency" type="C" size="20">
-			<DEFAULT value="Dollars"/>
-		</field>
-		<field name="website" type="C" size="255"></field>
+			<default value="Dollars" />
+		</field>
+		<field name="website" type="C" size="255" />
 		<field name="callornot" type="I" size="1">
-			<DEFAULT value="0"/>
+			<default value="0" />
 		</field>
 		<field name="readornot" type="I" size="1">
-			<DEFAULT value="0"/>
+			<default value="0" />
 		</field>
 		<field name="empct" type="I" size="10">
-			<DEFAULT value="0"/>
-		</field>
-		<opt>Type=InnoDB</opt>
-		<data>
-		</data>
-	</table>
-
-	<table name="leadsubdetails" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_LeadSubDetails FOREIGN KEY (leadsubscriptionid) REFERENCES leaddetails(leadid)  ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
+			<default value="0" />
+		</field>
+
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="leadaddress">
 		<field name="leadaddressid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
-		</field>
-		<field name="city" type="C" size="30"></field>
-		<field name="code" type="C" size="30"></field>
-		<field name="state" type="C" size="30"></field>
-		<field name="country" type="C" size="30"></field>
-		<field name="phone" type="C" size="50"></field>
-		<field name="mobile" type="C" size="50"></field>
-		<field name="fax" type="C" size="50"></field>
-		<field name="lane" type="C" size="250"></field>
+			<key />
+			<default value="0" />
+			<constraint>REFERENCES leaddetails(leadid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="city" type="C" size="30" />
+		<field name="code" type="C" size="30" />
+		<field name="state" type="C" size="30" />
+		<field name="country" type="C" size="30" />
+		<field name="phone" type="C" size="50" />
+		<field name="mobile" type="C" size="50" />
+		<field name="fax" type="C" size="50" />
+		<field name="lane" type="C" size="250" />
 		<field name="leadaddresstype" type="C" size="30">
-			<DEFAULT value="Billing"/>
-		</field>
-		<opt>Type=InnoDB</opt>
-		<data>
-		</data>
-
-	</table>
-
-
-	<table name="leadaddress" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_LeadAddress FOREIGN KEY (leadaddressid) REFERENCES leaddetails(leadid)  ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
+			<default value="Billing" />
+		</field>
+
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="leadscf">
 		<field name="leadid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
-		</field>
-		<opt>Type=InnoDB</opt>
-		<data>
-		</data>
-	</table>
-
-
-	<table name="leadscf" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_LeadsCF FOREIGN KEY (leadid) REFERENCES leaddetails(leadid)  ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
-
-<table name="notes">
+			<key />
+			<default value="0" />
+			<constraint>REFERENCES leaddetails(leadid) ON DELETE CASCADE</constraint>
+		</field>
+
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
+
+	<table name="notes">
 		<field name="notesid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
+			<key />
+			<default value="0" />
+			<constraint>REFERENCES crmentity(crmid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="contact_id" type="I" size="19">
-			<DEFAULT value="0"/>
-		</field>
-	
-                 <field name="title" type="C" size="50">
-			<NOTNULL/>
-		</field>
-		<field name="filename" type="C" size="50">
-			
-		</field>
-		<field name="notecontent" type="X"></field>
-		<opt>Type=InnoDB</opt> <index name="Notes_UK0">
+			<default value="0" />
+		</field>
+		<field name="title" type="C" size="50">
+			<notnull />
+		</field>
+		<field name="filename" type="C" size="50" />
+		<field name="notecontent" type="X" />
+
+		<index name="notes_title_idx">
 			<col>title</col>
 		</index>
-	 <index name="Notes_IDX0">
+		<index name="notes_notesid_idx">
 			<col>notesid</col>
 		</index>
- <index name="Notes_IDX1">
+		<index name="notes_crmid_idx">
 			<col>crmid</col>
 		</index>
-	<opt>Type=InnoDB</opt>
-		<data>
-		</data>
-	</table>
-
-	<table name="notes" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_Notes FOREIGN KEY (notesid) REFERENCES crmentity(crmid)  ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-<table name="potential">
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
+
+	<table name="potential">
 		<field name="potentialid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
-		</field>
-		<field name="accountid" type="I" size="19"></field>
+			<key />
+			<default value="0" />
+			<constraint>REFERENCES crmentity(crmid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="accountid" type="I" size="19" />
 		<field name="potentialname" type="C" size="120">
-			<NOTNULL/>
+			<notnull />
 		</field>
 		<field name="amount" type="N">
-			<DEFAULT value="0"/>
-		</field>
-		<field name="currency" type="C" size="20"></field>
-
-		<field name="closingdate" type="D"></field>
-		<field name="typeofrevenue" type="C" size="50"></field>
-		<field name="campaignsource" type="C" size="30"></field>
-		<field name="nextstep" type="C" size="100"></field>
+			<default value="0" />
+		</field>
+		<field name="currency" type="C" size="20" />
+		<field name="closingdate" type="D" />
+		<field name="typeofrevenue" type="C" size="50" />
+		<field name="campaignsource" type="C" size="30" />
+		<field name="nextstep" type="C" size="100" />
 		<field name="private" type="I" size="1">
-			<DEFAULT value="0"/>
+			<default value="0" />
 		</field>
 		<field name="probability" type="N" size="7.3">
-			<DEFAULT value="0"/>
-		</field>
-		<field name="sales_stage" type="C" size="50"></field>
-		<field name="potentialtype" type="C" size="50"></field>
-		<field name="leadsource" type="C" size="50"></field>
-		<field name="productid" type="I" size="50"></field>
-		<field name="productversion" type="C" size="50"></field>
-		<field name="quotationref" type="C" size="50"></field>
-		<field name="partnercontact" type="C" size="50"></field>
-		<field name="remarks" type="C" size="50"></field>
+			<default value="0" />
+		</field>
+		<field name="sales_stage" type="C" size="50" />
+		<field name="potentialtype" type="C" size="50" />
+		<field name="leadsource" type="C" size="50" />
+		<field name="productid" type="I" size="50" />
+		<field name="productversion" type="C" size="50" />
+		<field name="quotationref" type="C" size="50" />
+		<field name="partnercontact" type="C" size="50" />
+		<field name="remarks" type="C" size="50" />
 		<field name="runtimefee" type="I" size="19">
-			<DEFAULT value="0"/>
-		</field>
-		<field name="followupdate" type="D"></field>
-		<field name="evaluationstatus" type="C" size="50"></field>
-		<field name="description" type="X"></field>
+			<default value="0" />
+		</field>
+		<field name="followupdate" type="D" />
+		<field name="evaluationstatus" type="C" size="50" />
+		<field name="description" type="X" />
 		<field name="forecastcategory" type="I" size="19">
-			<DEFAULT value="0"/>
+			<default value="0" />
 		</field>
 		<field name="outcomeanalysis" type="I" size="19">
-			<DEFAULT value="0"/>
-		</field>
-			<opt>Type=InnoDB</opt> <index name="Potential_IDX0">
+			<default value="0" />
+		</field>
+
+		<index name="potential_accountid_idx">
 			<col>accountid</col>
 		</index>
-		<index name="potential_potentialid">
+		<index name="potential_potentialid_idx">
 			<col>potentialid</col>
 		</index>
-		<index name="potentail_sales_stage">
+		<index name="potentail_sales_stage_idx">
 			<col>sales_stage</col>
 		</index>
-		<opt>Type=InnoDB</opt>
-		<data>
-		</data>
-
-	</table>
-
-
-
-	<table name="potential" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_Potential FOREIGN KEY (potentialid) REFERENCES crmentity(crmid) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
-      <table name="potstagehistory">
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
+
+	<table name="potstagehistory">
 		<field name="historyid" type="I" size="19">
-                         <KEY/>	 
-                         <AUTOINCREMENT/>	 
-		</field>
-
+			<key />
+			<autoincrement />
+		</field>
 		<field name="potentialid" type="I" size="19">
-			<NOTNULL/>
-		</field>
-		<field name="amount" type="N"></field>
-		<field name="stage" type="C" size="100"></field>
-
-		<field name="probability" type="N" size="7.3"></field>
-		<field name="expectedrevenue" type="N"></field>
-		<field name="closedate" type="D"></field>
+			<notnull />
+			<constraint>REFERENCES potential(potentialid) ON DELETE CASCADE </constraint>
+		</field>
+		<field name="amount" type="N" />
+		<field name="stage" type="C" size="100" />
+		<field name="probability" type="N" size="7.3" />
+		<field name="expectedrevenue" type="N" />
+		<field name="closedate" type="D" />
 		<field name="lastmodified" type="T">
-                        <NOTNULL/>
-                </field>
-		<opt>Type=InnoDB</opt>
-	       	
-	       	<index name="PotStageHistory_IDX1">
+			<notnull />
+		</field>
+
+		<index name="potstagehistory_potentialid_idx">
 			<col>potentialid</col>
 		</index>
-		<data>
-		</data>
-	</table>
-
-
-		<table name="potstagehistory" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_PotStageHistory FOREIGN KEY (potentialid) REFERENCES potential(potentialid) ON DELETE CASCADE  </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="potentialscf">
 		<field name="potentialid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
-		</field>
-		<opt>Type=InnoDB</opt> 
-		<data>
-		</data>
-	</table>
-
-
-	<table name="potentialscf" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_PotentialsCF2 FOREIGN KEY (potentialid) REFERENCES potential(potentialid)  ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
+			<key />
+			<default value="0" />
+			<constraint>REFERENCES potential(potentialid) ON DELETE CASCADE</constraint>
+		</field>
+
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="activity">
 		<field name="activityid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
-		</field>
-
+			<key />
+			<default value="0" />
+			<constraint>REFERENCES crmentity(crmid) ON DELETE CASCADE</constraint>
+		</field>
 		<field name="subject" type="C" size="100">
-			<NOTNULL/>
-		</field>
-		<field name="semodule" type="C" size="20">
-			
-		</field>
-
+			<notnull />
+		</field>
+		<field name="semodule" type="C" size="20" />
 		<field name="activitytype" type="C" size="50">
-			<NOTNULL/>
-		</field>
-         	<field name="description" type="X">
-		</field>
-
-       		<field name="date_start" type="D">      
-                        </field>                        
-		<field name="due_date" type="D">      
-                        </field>                        
-
-
+			<notnull />
+		</field>
+		<field name="description" type="X" />
+		<field name="date_start" type="D" />
+		<field name="due_date" type="D" />
 		<field name="time_start" type="C" size="50">
-			<NOTNULL/>
-		</field>
-
+			<notnull />
+		</field>
 		<field name="sendnotification" type="C" size="50">
-			<NOTNULL/>
-			<DEFAULT value="false"/>
-		</field>
-                <field name="duration_hours" type="C" size="2"></field> 
-                <field name="duration_minutes" type="C" size="2"></field> 
-		<field name="status" type="C" size="100">
-		</field>
-		<field name="eventstatus" type="C" size="100">
-		</field>
-		<field name="priority" type="C" size="150"></field>     
-                <field name="location" type="C" size="150"></field>     
-
-                
-			<opt>Type=InnoDB</opt> 
-		<index name="Activity_IDX0">
+			<notnull />
+			<default value="false" />
+		</field>
+		<field name="duration_hours" type="C" size="2" />
+		<field name="duration_minutes" type="C" size="2" />
+		<field name="status" type="C" size="100" />
+		<field name="eventstatus" type="C" size="100" />
+		<field name="priority" type="C" size="150" />
+		<field name="location" type="C" size="150" />
+
+		<index name="activity_activityid_subject_idx">
 			<col>activityid</col>
 			<col>subject</col>
 		</index>
-		<index name="activity_activitytype">
+		<index name="activity_activitytype_date_start_idx">
 			<col>activitytype</col>
 			<col>date_start</col>
 		</index>
-		<index name="date_start">
+		<index name="activity_date_start_due_date_idx">
 			<col>date_start</col>
 			<col>due_date</col>
 		</index>
-		<index name="date_start2">
+		<index name="activity_date_start_time_start_idx">
 			<col>date_start</col>
 			<col>time_start</col>
 		</index>
-		<index name="activity_eventstatus">
+		<index name="activity_eventstatus_idx">
 			<col>eventstatus</col>
 		</index>
-		<index name="activity_status">
+		<index name="activity_status_eventstatus_idx">
 			<col>status</col>
 			<col>eventstatus</col>
 		</index>
-		<data>
-		</data>
-	</table>
-
-	<table name="activity" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_Activity FOREIGN KEY (activityid) REFERENCES crmentity(crmid) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
-
-
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="attachments">
-	<field name="attachmentsid" type="I" size="19">
-			<KEY/>
-		</field>
-
+		<field name="attachmentsid" type="I" size="19">
+			<key />
+			<constraint>REFERENCES crmentity(crmid) ON DELETE CASCADE</constraint>
+		</field>
 		<field name="name" type="C" size="100">
-			<NOTNULL/>
-		</field>
-		<field name="description" type="C" size="100">
-		</field>
-		<field name="type" type="C" size="100">
-		</field>
-
+			<notnull />
+		</field>
+		<field name="description" type="C" size="100" />
+		<field name="type" type="C" size="100" />
 		<field name="attachmentsize" type="C" size="50">
-			<NOTNULL/>
+			<notnull />
 		</field>
 		<field name="attachmentcontents" type="B">
-			<NOTNULL/>
-		</field>
-
-		<opt>Type=InnoDB</opt> 
-		<index name="attachments_attachmentsid">
+			<notnull />
+		</field>
+
+		<index name="attachments_attachmentsid_idx">
 			<col>attachmentsid</col>
 		</index>
-		<index name="description">
+		<index name="attachments_description_name_type_attachmentsid_idx">
 			<col>description</col>
 			<col>name</col>
 			<col>type</col>
 			<col>attachmentsid</col>
 		</index>
-		<data>
-		</data>
-	</table>
-
-
-
-	<table name="attachments" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_Attachments FOREIGN KEY (attachmentsid) REFERENCES crmentity(crmid) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="seattachmentsrel">
 		<field name="crmid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
+			<key />
+			<default value="0" />
 		</field>
 		<field name="attachmentsid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
-		</field>
-		<opt>Type=InnoDB</opt> <index name="SeAttachmentsRel_IDX0">
+			<key />
+			<default value="0" />
+			<constraint>REFERENCES attachments(attachmentsid) ON DELETE CASCADE</constraint>
+		</field>
+
+		<index name="seattachmentsrel_attachmentsid_idx">
 			<col>attachmentsid</col>
 		</index>
-		<opt>Type=InnoDB</opt> <index name="SeAttachmentsRel_IDX1">
+		<index name="seattachmentsrel_crmid_idx">
 			<col>crmid</col>
-		</index>
-		<index name="seattachmentsrel_attachmentsid">
+			<constraint>REFERENCES crmentity(crmid) ON DELETE CASCADE</constraint>
+		</index>
+		<index name="seattachmentsrel_attachmentsid_crmid_idx">
 			<col>attachmentsid</col>
 			<col>crmid</col>
 		</index>
-
-		<data>
-		</data>
-	</table>
-
-
-
-	<table name="seattachmentsrel" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_SeAttachmentsRel FOREIGN KEY (attachmentsid) REFERENCES attachments(attachmentsid) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
-	<table name="seattachmentsrel" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_SeAttachmentsRel2 FOREIGN KEY (crmid) REFERENCES crmentity(crmid) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-	 <table name="tracker">	 
-                 <field name="id" type="I" size="11">	 
-                         <KEY/>	 
-                         <AUTOINCREMENT/>	 
-                 </field>	 
-                 <field name="user_id" type="C" size="36"></field>	 
-                 <field name="module_name" type="C" size="25"></field>	 
-                 <field name="item_id" type="C" size="36"></field>	 
-                 <field name="item_summary" type="C" size="255"></field>	 
-                 <data>	 
-                 </data>	 
-         </table>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
+
+	<table name="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" />
+	</table>
 
 	<table name="competitor">
-	<field name="competitorid" type="I" size="19">
-			<KEY/>
-		</field>
-
+		<field name="competitorid" type="I" size="19">
+			<key />
+			<constraint>REFERENCES crmentity(crmid) ON DELETE CASCADE</constraint>
+		</field>
 		<field name="competitorname" type="C" size="100">
-			<NOTNULL/>
-		</field>
-		<field name="website" type="C" size="100"></field>
-		<field name="strength" type="C" size="250"></field>
-		<field name="weakness" type="C" size="250"></field>
-	
-		 
-		<opt>Type=InnoDB</opt>
-		<data>
-		</data>
-	</table>
-
-	<table name="competitor" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_Competitor FOREIGN KEY (competitorid) REFERENCES crmentity(crmid) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
+			<notnull />
+		</field>
+		<field name="website" type="C" size="100" />
+		<field name="strength" type="C" size="250" />
+		<field name="weakness" type="C" size="250" />
+
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="potcompetitorrel">
 		<field name="potentialid" type="I" size="19">
-			<KEY/>
+			<key />
+			<constraint>REFERENCES potential(potentialid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="competitorid" type="I" size="19">
-			<KEY/>
-		</field>
-		<opt>Type=InnoDB</opt> <index name="PotCompetitorRel_IDX0">
+			<key />
+			<constraint>REFERENCES competitor(competitorid) ON DELETE CASCADE</constraint>
+		</field>
+
+		<index name="potcompetitorrel_potentialid_idx">
 			<col>potentialid</col>
 		</index>
-		<opt>Type=InnoDB</opt> <index name="PotCompetitorRel_IDX1">
+		<index name="potcompetitorrel_competitorid_idx">
 			<col>competitorid</col>
 		</index>
-		<data>
-		</data>
-	</table>
-
-
-	<table name="potcompetitorrel" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_PotCompetitorRel FOREIGN KEY (potentialid) REFERENCES potential(potentialid) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
-	<table name="potcompetitorrel" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_PotCompetitorRel2 FOREIGN KEY (competitorid) REFERENCES competitor(competitorid) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="products">
 		<field name="productid" type="I" size="11">
-			<KEY/>
+			<key />
+			<constraint>REFERENCES crmentity(crmid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="productname" type="C" size="50">
-			<NOTNULL/>
-		</field>
-		<field name="productcode" type="C" size="40"></field>
-		<field name="productcategory" type="C" size="40"></field>
-		<field name="manufacturer" type="C" size="40"></field>
-		<field name="product_description" type="X"></field>
+			<notnull />
+		</field>
+		<field name="productcode" type="C" size="40" />
+		<field name="productcategory" type="C" size="40" />
+		<field name="manufacturer" type="C" size="40" />
+		<field name="product_description" type="X" />
 		<field name="qty_per_unit" type="N" size="11.2">
-			<DEFAULT value="0"/>
-		</field>
-		<field name="unit_price" type="N" size="11.2"></field>
-		<field name="weight" type="N" size="11.3"></field>
-		<field name="pack_size" type="I" size="11"></field>
-		<field name="sales_start_date" type="D"></field>
-		<field name="sales_end_date" type="D"></field>
-		<field name="start_date" type="D"></field>
-		<field name="expiry_date" type="D"></field>
-		<field name="cost_factor" type="I" size="11"></field>
-		<field name="commissionrate" type="N" size="7.3"></field>
-		<field name="commissionmethod" type="C" size="50"></field>
-		<field name="discontinued" type="I" size="1"></field>
-		<field name="usageunit" type="C" size="200"></field>
-		<field name="handler" type="I" size="11"></field>
-		<field name="contactid" type="I" size="11"></field>
-		<field name="currency" type="C" size="200"></field>
-		<field name="reorderlevel" type="I" size="11"></field>
-		<field name="website" type="C" size="100"></field>
-		<field name="taxclass" type="C" size="200"></field>
-		<field name="mfr_part_no" type="C" size="200"></field>
-		<field name="vendor_part_no" type="C" size="200"></field>
-		<field name="serialno" type="C" size="200"></field>
-		<field name="qtyinstock" type="I" size="11"></field>
-		<field name="productsheet" type="C" size="200"></field>
-		<field name="qtyindemand" type="I" size="11"></field>
-		<field name="glacct" type="C" size="200"></field>
-		<field name="vendor_id" type="I" size="11"></field>	
-		<field name="imagename" type="C" size="150"></field>
-	
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-	<table name="products" alter="true">
-
-        	<constraint>ADD CONSTRAINT fk_productsCF FOREIGN KEY (productid) REFERENCES crmentity(crmid)  ON DELETE CASCADE             </constraint>
-
-                <opt>Type=InnoDB</opt>
-
-                <data>
-                </data>
-        </table>
+			<default value="0" />
+		</field>
+		<field name="unit_price" type="N" size="11.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" />
+		<field name="usageunit" type="C" size="200" />
+		<field name="handler" type="I" size="11" />
+		<field name="contactid" type="I" size="11" />
+		<field name="currency" 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="I" size="11" />
+		<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="C" size="150" />
+
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="currency">
 		<field name="currencyid" type="I" size="19">
-			<KEY/>
-	<AUTOINCREMENT/>
-		
+			<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>
-		<opt>Type=InnoDB</opt> <index name="Currency_CRY">
-			<UNIQUE/>
+			<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>
-		<data>
-		</data>
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="manufacturer">
 		<field name="manufacturerid" type="I" size="19">
-			<KEY/>
-	<AUTOINCREMENT/>
-		
+			<key />
+			<autoincrement />
 		</field>
 		<field name="manufacturer" 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>
-		<opt>Type=InnoDB</opt> <index name="Manufacturer_MFR">
-			<UNIQUE/>
+			<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="manufacturer_manufacturer_idx">
+			<unique />
 			<col>manufacturer</col>
 		</index>
-		<data>
-		</data>
-	</table>
-
-
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="productcollaterals">
 		<field name="productid" type="I" size="11">
-			<KEY/>
+			<key />
+			<constraint>REFERENCES products(productid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="date_entered" type="T">
-			<NOTNULL/>
-			<DEFTIMESTAMP/>
-		</field>
-	
+			<notnull />
+			<deftimestamp />
+		</field>
 		<field name="data" type="B">
-			<NOTNULL/>
-		</field>
-		<field name="description" type="X"></field>
-		<field name="filename" type="C" size="50">
-		</field>
+			<notnull />
+		</field>
+		<field name="description" type="X" />
+		<field name="filename" type="C" size="50" />
 		<field name="filesize" type="C" size="50">
-			<NOTNULL/>
+			<notnull />
 		</field>
 		<field name="filetype" type="C" size="20">
-			<NOTNULL/>
-		</field>
-		<index name="idx_collaterals_name">
+			<notnull />
+		</field>
+
+		<index name="productcollaterals_productid_filename_idx">
 			<col>productid</col>
 			<col>filename</col>
 		</index>
-		<opt>Type=InnoDB</opt>
-		<data>
-		</data>
-	</table>
-	<table name="productcollaterals" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_productcollaterals FOREIGN KEY (productid) REFERENCES products(productid) ON DELETE CASCADE</constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="role">
-                <field name="roleid" type="I" size="11">
-                        <KEY/>
-                        <AUTOINCREMENT/></field>
-                <field name="name" type="C" size="60">
-                </field>
-                <field name="description" type="C" size="100"></field>
-		<opt>Type=InnoDB</opt>
-                <data>
-
-                </data>
-        </table>
-
+		<field name="roleid" type="I" size="11">
+			<key />
+			<autoincrement />
+		</field>
+		<field name="name" type="C" size="60" />
+		<field name="description" type="C" size="100" />
+
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="user2role">
 		<field name="userid" type="I" size="11">
-			<KEY/>
+			<key />
+			<constraint>REFERENCES users(id) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="roleid" type="I" size="11">
-			<NOTNULL/>
-		</field>
-	        <opt>Type=InnoDB</opt>	
-	       	<index name="user2role_IDX1">
+			<notnull />
+			<constraint>REFERENCES role(roleid) ON DELETE CASCADE</constraint>
+		</field>
+
+		<index name="user2role_roleid_idx">
 			<col>roleid</col>
 		</index>
-		<data>
-		
-		</data>
-	</table>
-
-
-	<table name="user2role" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_user2role1 FOREIGN KEY (userid) REFERENCES users(id) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
-	<table name="user2role" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_user2role2 FOREIGN KEY (roleid) REFERENCES role(roleid) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="groups">
 		<field name="name" type="C" size="100">
-			<KEY/>
-		</field>
-		<field name="description" type="X"></field>
-		
-		<opt>Type=InnoDB</opt> 
-		<data>
-		</data>
-	</table>
-
-
+			<key />
+		</field>
+		<field name="description" type="X" />
+
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="users2group">
 		<field name="groupname" type="C" size="100">
-		</field>
-		<field name="userid" type="C" size="50">
-		</field>
-		<index name="idx_users2group">
+			<constraint>REFERENCES groups(name) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="userid" type="C" size="50" />
+
+		<index name="users2group_groupname_uerid_idx">
 			<col>groupname</col>
 			<col>userid</col>
 		</index>
-		<data>
-		</data>
-	</table>
-
-	<table name="users2group" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_users2group FOREIGN KEY (groupname) REFERENCES groups(name) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
-
+	</table>
 
 	<table name="leadpotrel">
 		<field name="leadid" type="I" size="19">
-			<NOTNULL/>
-			<DEFAULT value="0"/>
+			<notnull />
+			<default value="0" />
+			<constraint>REFERENCES leaddetails(leadid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="potentialid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
-		</field>
-		<opt>Type=InnoDB</opt> <index name="LeadPotRel_UK0">
-			<UNIQUE/>
+			<key />
+			<default value="0" />
+			<constraint>REFERENCES potential(potentialid) ON DELETE CASCADE</constraint>
+		</field>
+
+		<index name="leadpotrel_leadid_idx">
 			<col>leadid</col>
-		</index>
-		
-		 
-           <opt>Type=InnoDB</opt>
-		<data>
-		</data>
-	</table>
-
-
-	<table name="leadpotrel" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_LeadPotRel1 FOREIGN KEY (leadid) REFERENCES leaddetails(leadid) ON DELETE CASCADE</constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-	<table name="leadpotrel" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_LeadPotRel2 FOREIGN KEY (potentialid) REFERENCES potential(potentialid)  ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
+			<unique />
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="leadcontrel">
 		<field name="leadid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
+			<key />
+			<default value="0" />
+			<constraint>REFERENCES leaddetails(leadid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="contactid" type="I" size="19">
-			<NOTNULL/>
-			<DEFAULT value="0"/>
-		</field>
-		
-		<index name="LeadContRel_IDX1">
+			<notnull />
+			<default value="0" />
+		</field>
+
+		<index name="leadcontrel_contactid_idx">
 			<col>contactid</col>
-		</index>
-<opt>Type=InnoDB</opt>
-		<data>
-		</data>
-	</table>
-
-
-
-
-	<table name="leadcontrel" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_LeadContRel1 FOREIGN KEY (leadid) REFERENCES leaddetails(leadid)  ON DELETE CASCADE</constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-	<table name="leadcontrel" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_LeadContRel2 FOREIGN KEY (contactid) REFERENCES contactdetails(contactid)  ON DELETE CASCADE</constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
-
+			<constraint>REFERENCES contactdetails(contactid) ON DELETE CASCADE</constraint>
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="leadacctrel">
 		<field name="leadid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
+			<key />
+			<default value="0" />
+			<constraint>REFERENCES leaddetails(leadid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="accountid" type="I" size="19">
-			<NOTNULL/>
-			<DEFAULT value="0"/>
-		</field>
-		
-		<opt>Type=InnoDB</opt> <index name="LeadAcctRel_IDX1">
+			<notnull />
+			<default value="0" />
+			<constraint>REFERENCES account(accountid) ON DELETE CASCADE</constraint>
+		</field>
+
+		<index name="leadacctrel_accountid_idx">
 			<col>accountid</col>
 		</index>
-		<data>
-		</data>
-	</table>
-
-
-	<table name="leadacctrel" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_LeadAcctRel1 FOREIGN KEY (leadid) REFERENCES leaddetails(leadid)  ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-	<table name="leadacctrel" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_LeadAcctRel2 FOREIGN KEY (accountid) REFERENCES account(accountid)  ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
-
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="contpotentialrel">
 		<field name="contactid" type="I" size="19">
-			<KEY/>
-			<NOTNULL/>
-			<DEFAULT value="0"/>
+			<key />
+			<notnull />
+			<default value="0" />
 		</field>
 		<field name="potentialid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
-		</field>
-		<opt>Type=InnoDB</opt> <index name="ContPotentialRel_IDX0">
+			<key />
+			<default value="0" />
+		</field>
+
+		<index name="contpotentialrel_potentialid_idx">
 			<col>potentialid</col>
-		</index>
-		<opt>Type=InnoDB</opt> <index name="ContPotentialRel_IDX1">
+			<constraint>REFERENCES potential(potentialid) ON DELETE CASCADE</constraint>
+		</index>
+		<index name="contpotentialrel_contactid_idx">
 			<col>contactid</col>
-		</index>
-		<data>
-		</data>
-	</table>
-
-	<table name="contpotentialrel" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_ContPotentialRel1 FOREIGN KEY (contactid) REFERENCES contactdetails(contactid)  ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-	<table name="contpotentialrel" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_ContPotentialRel FOREIGN KEY (potentialid) REFERENCES potential(potentialid)  ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
+			<constraint>REFERENCES contactdetails(contactid) ON DELETE CASCADE</constraint>
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="dealintimation">
 		<field name="dealintimationid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
+			<key />
+			<default value="0" />
 		</field>
 		<field name="dealname" type="C" size="100">
-			<NOTNULL/>
+			<notnull />
 		</field>
 		<field name="intimationamount" type="I" size="19">
-			<NOTNULL/>
-			<DEFAULT value="0"/>
+			<notnull />
+			<default value="0" />
 		</field>
 
 		<field name="dealprobability" type="N" size="7.3">
-			<NOTNULL/>
-			<DEFAULT value="0"/>
-		</field>
-		<field name="dealintimationactive" type="I" size="1"></field>
+			<notnull />
+			<default value="0" />
+		</field>
+		<field name="dealintimationactive" type="I" size="1" />
 		<field name="fromname" type="C" size="120">
-			<NOTNULL/>
+			<notnull />
 		</field>
 		<field name="fromemailid" type="C" size="100">
-			<NOTNULL/>
+			<notnull />
 		</field>
 		<field name="notifyemails" type="C" size="50">
-			<NOTNULL/>
+			<notnull />
 		</field>
 		<field name="notifybccemails" type="C" size="50">
-			<NOTNULL/>
+			<notnull />
 		</field>
 		<field name="notifyccmails" type="C" size="50">
-			<NOTNULL/>
-		</field>
-		<field name="notifypotentialowner" type="I" size="1"></field>
-		<opt>Type=InnoDB</opt> <index name="DealIntimation_UK0">
-			<UNIQUE/>
+			<notnull />
+		</field>
+		<field name="notifypotentialowner" type="I" size="1" />
+
+		<index name="dealintimation_dealname_idx">
 			<col>dealname</col>
-		</index>
-		<data>
-		</data>
-	</table>
-
+			<unique />
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="cntactivityrel">
 		<field name="contactid" type="I" size="19">
-			<NOTNULL/>
-			<DEFAULT value="0"/>
+			<notnull />
+			<default value="0" />
 		</field>
 		<field name="activityid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
-		</field>
-		<opt>Type=InnoDB</opt> <index name="CntActivityRel_IDX0">
+			<key />
+			<default value="0" />
+			<constraint>REFERENCES activity(activityid) ON DELETE CASCADE</constraint>
+		</field>
+
+		<index name="cntactivityrel_contactid_idx">
 			<col>contactid</col>
-		</index>
-		<opt>Type=InnoDB</opt>
-		<data>
-		</data>
-	</table>
-
-
-
-
-	<table name="cntactivityrel" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_CntActivityRel FOREIGN KEY (contactid) REFERENCES contactdetails(contactid)  ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-	<table name="cntactivityrel" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_CntActivityRel2 FOREIGN KEY (activityid) REFERENCES activity(activityid) ON DELETE CASCADE</constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
-        <!-- Lead Assignment Rule -->
+			<constraint>REFERENCES contactdetails(contactid) ON DELETE CASCADE</constraint>
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
+
+	<!-- Lead Assignment Rule -->
 	<table name="lar">
 		<field name="larid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
+			<key />
+			<default value="0" />
 		</field>
 		<field name="name" type="C" size="50">
-			<NOTNULL/>
+			<notnull />
 		</field>
 		<field name="createdby" type="I" size="19">
-			<NOTNULL/>
-			<DEFAULT value="0"/>
+			<notnull />
+			<default value="0" />
+			<constraint>REFERENCES users(id) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="createdon" type="D">
-			<NOTNULL/>
-		</field>
-		<opt>Type=InnoDB</opt> <index name="LAR_UK0">
-			<UNIQUE/>
+			<notnull />
+		</field>
+
+		<index name="lar_name_idx">
 			<col>name</col>
-		</index>
-		<opt>Type=InnoDB</opt> <index name="LAR_IDX0">
+			<unique />
+		</index>
+		<index name="lar_createdby_idx">
 			<col>createdby</col>
 		</index>
-		<data>
-		</data>
-	</table>
-
- 	<table name="lar" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_LAR FOREIGN KEY (createdby) REFERENCES users(id)  ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="crmentitynotesrel">
 		<field name="crmid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
+			<key />
+			<default value="0" />
 		</field>
 		<field name="notesid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
-		</field>
-		 <index name="crmentityNotesRel_IDX0">
+			<key />
+			<default value="0" />
+		</field>
+
+		<index name="crmentitynotesrel_notesid_idx">
 			<col>notesid</col>
-		</index>
-		 <index name="crmentityNotesRel_IDX1">
+			<constraint>REFERENCES notes(notesid) ON DELETE CASCADE</constraint>
+		</index>
+		<index name="crmentitynotesrel_crmid_idx">
 			<col>crmid</col>
-		</index>
-<opt>Type=InnoDB</opt>
-		<data>
-		</data>
-	</table>
-
-	<table name="crmentitynotesrel" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_crmentityNotes FOREIGN KEY (crmid) REFERENCES crmentity(crmid)  ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
-	<table name="crmentitynotesrel" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_crmentityNotes2 FOREIGN KEY (notesid) REFERENCES notes(notesid)  ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
+			<constraint>REFERENCES crmentity(crmid) ON DELETE CASCADE</constraint>
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="troubletickets">
 		<field name="ticketid" type="I" size="19">
-			<KEY/>
-		</field>
-		<field name="groupname" type="C" size="100"></field>
-<field name="parent_id" type="C" size="100"></field>
-<field name="product_id" type="C" size="100"></field>
-		<field name="priority" type="C" size="150"></field>
-		<field name="severity" type="C" size="150"></field>
-		<field name="status" type="C" size="150"></field>
-       		<field name="category" type="C" size="150"></field>
+			<key />
+		</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="150" />
+		<field name="severity" type="C" size="150" />
+		<field name="status" type="C" size="150" />
+		<field name="category" type="C" size="150" />
 		<field name="title" type="C" size="255">
-			<NOTNULL/>
-		</field>
-		<field name="description" type="X"></field>
-		<field name="solution" type="X"></field>
-		<field name="update_log" type="X"></field>
-		<field name="version_id" type="I" size="11">
-		</field>
-		 	
-		<opt>Type=InnoDB</opt>
-	 		<index name="troubletickets_IDX0">
-                                <col>ticketid</col>
-                        </index>	
-			<index name="troubletickets_status">
-                                <col>status</col>
-                        </index>	
-
-		<data>
-		</data>
-	</table>
-	<table name="troubletickets" alter="true">
-
-                <constraint>ADD CONSTRAINT fk_troubleticketsCF FOREIGN KEY (ticketid) REFERENCES crmentity(crmid)  ON DELETE CASCADE        </constraint>
-
-                <opt>Type=InnoDB</opt>
-
-                <data>
-                </data>
-        </table>
+			<notnull />
+		</field>
+		<field name="description" type="X" />
+		<field name="solution" type="X" />
+		<field name="update_log" type="X" />
+		<field name="version_id" type="I" size="11" />
+
+		<index name="troubletickets_ticketid_idx">
+			<col>ticketid</col>
+			<constraint>REFERENCES crmentity(crmid) ON DELETE CASCADE</constraint>
+		</index>
+		<index name="troubletickets_status_idx">
+			<col>status</col>
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="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>
-                <field name="ownerid" type="I" size="19">
-                        <NOTNULL/>
-                        <DEFAULT value="0"/>
-                </field>
-                <field name="ownertype" type="C" size="10"></field>
+			<key />
+			<autoincrement />
+		</field>
+		<field name="ticketid" type="I" size="19">
+			<constraint>REFERENCES troubletickets(ticketid) ON DELETE CASCADE</constraint>
+		</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" >
-			<DEFTIMESTAMP/>
-                        <NOTNULL/>
-                </field>
-
-		<opt>Type=InnoDB</opt>
-                        <index name="ticketcomments_IDX0">
-                                <col>ticketid</col>
-                        </index>
-
-                <data>
-                </data>
-	</table>
-	<table name="ticketcomments" alter="true">
-
-                <constraint>ADD CONSTRAINT fk_ticketcommentsCF FOREIGN KEY (ticketid) REFERENCES troubletickets(ticketid)  ON DELETE CASCADE </constraint>
-
-                <opt>Type=InnoDB</opt>
-
-                <data>
-                </data>
-        </table>
+			<deftimestamp />
+			<notnull />
+		</field>
+
+		<index name="ticketcomments_ticketid_idx">
+			<col>ticketid</col>
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="salesmanactivityrel">
 		<field name="smid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
+			<key />
+			<default value="0" />
+			<constraint>REFERENCES users(id) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="activityid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
-		</field>
-		<opt>Type=InnoDB</opt> <index name="SalesmanActivityRel_IDX0">
+			<key />
+			<default value="0" />
+			<constraint>REFERENCES activity(activityid) ON DELETE CASCADE</constraint>
+		</field>
+
+		<index name="salesmanactivityrel_activityid_idx">
 			<col>activityid</col>
 		</index>
-		<opt>Type=InnoDB</opt> <index name="SalesmanActivityRel_IDX1">
+		<index name="salesmanactivityrel_smid_idx">
 			<col>smid</col>
 		</index>
-		<data>
-		</data>
-	</table>
-
-
-	<table name="salesmanactivityrel" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_SalesmanActivityRel FOREIGN KEY (smid) REFERENCES users(id) ON DELETE CASCADE</constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
-
-	<table name="salesmanactivityrel" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_SalesmanActivityRel2 FOREIGN KEY (activityid) REFERENCES activity(activityid) ON DELETE CASCADE</constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-        <table name="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>
-                <opt>Type=InnoDB</opt> <index name="VendorContactRel_IDX0">
-                        <col>vendorid</col>
-                </index>
-                <opt>Type=InnoDB</opt> <index name="VendorContactRel_IDX1">
-                        <col>contactid</col>
-                </index>
-                <data>
-                </data>
-        </table>
-
-
-        <table name="vendorcontactrel" alter="true">
-
-                <constraint>ADD CONSTRAINT fk_VendorContactRel2contactid FOREIGN KEY (contactid) REFERENCES contactdetails(contactid) ON DELETE CASCADE</constraint>
-		     <opt>Type=InnoDB</opt>
-
-                <data>
-                </data>
-        </table>
-
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="salesmanticketrel">
 		<field name="smid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
+			<key />
+			<default value="0" />
+			<constraint>REFERENCES users(id) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="id" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
-		</field>
-		<opt>Type=InnoDB</opt> <index name="SalesmanTicketRel_IDX1">
+			<key />
+			<default value="0" />
+			<constraint>REFERENCES troubletickets(ticketid) ON DELETE CASCADE</constraint>
+		</field>
+
+		<index name="salesmanticketrel_smid_idx">
 			<col>smid</col>
 		</index>
-		<opt>Type=InnoDB</opt> <index name="SalesmanTicketRel_IDX0">
+		<index name="salesmanticketrel_id_idx">
 			<col>id</col>
 		</index>
-		
-		<data>
-		</data>
-	</table>
-
-
-	<table name="salesmanticketrel" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_SalesmanTicketRel FOREIGN KEY (smid) REFERENCES users(id) ON DELETE CASCADE</constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
-
-	<table name="salesmanticketrel" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_SalesmanTicketRel2 FOREIGN KEY (id) REFERENCES troubletickets(ticketid) ON DELETE CASCADE</constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="seactivityrel">
-		<field name="crmid" type="I" size="19"><KEY/></field>
+		<field name="crmid" type="I" size="19">
+			<key />
+			<constraint>REFERENCES crmentity(crmid) ON DELETE CASCADE</constraint>
+		</field>
 		<field name="activityid" type="I" size="19">
-			<KEY/>
-		</field>
-		<opt>Type=InnoDB</opt> <index name="SeActivityRel_IDX0">
+			<key />
+			<constraint>REFERENCES activity(activityid) ON DELETE CASCADE</constraint>
+		</field>
+
+		<index name="seactivityrel_activityid_idx">
 			<col>activityid</col>
 		</index>
-		<opt>Type=InnoDB</opt> <index name="SeActivityRel_IDX1">
+		<index name="seactivityrel_crmid_idx">
 			<col>crmid</col>
 		</index>
-		<data>
-		</data>
-	</table>
-
-	<table name="seactivityrel" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_SeActivityRel1 FOREIGN KEY (crmid) REFERENCES crmentity(crmid) ON DELETE CASCADE</constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
-	<table name="seactivityrel" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_SeActivityRel2 FOREIGN KEY (activityid) REFERENCES activity(activityid) ON DELETE CASCADE</constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="seproductsrel">
 		<field name="crmid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
+			<key />
+			<default value="0" />
+			<constraint>REFERENCES crmentity(crmid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="productid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
-		</field>
-		<opt>Type=InnoDB</opt> <index name="SeProductsRel_IDX0">
+			<key />
+			<default value="0" />
+			<constraint>REFERENCES products(productid) ON DELETE CASCADE</constraint>
+		</field>
+
+		<index name="seproductsrel_productid_idx">
 			<col>productid</col>
 		</index>
-		<opt>Type=InnoDB</opt> <index name="SeProductRel_IDX1">
+		<index name="seproductrel_crmid_idx">
 			<col>crmid</col>
 		</index>
-		<data>
-		</data>
-	</table>
-
-
-
-	<table name="seproductsrel" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_SeProductsRel1 FOREIGN KEY (crmid) REFERENCES crmentity(crmid) ON DELETE CASCADE</constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
-	<table name="seproductsrel" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_SeProductsRel2 FOREIGN KEY (productid) REFERENCES products(productid) ON DELETE CASCADE</constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
-
-
-
-
-
-
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="seticketsrel">
 		<field name="crmid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
+			<key />
+			<default value="0" />
 		</field>
 		<field name="ticketid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
-		</field>
-		<opt>Type=InnoDB</opt> <index name="SeTicketsRel_IDX1">
+			<key />
+			<default value="0" />
+			<constraint>REFERENCES troubletickets(ticketid) ON DELETE CASCADE</constraint>
+		</field>
+
+		<index name="seticketsrel_crmid_idx">
 			<col>crmid</col>
 		</index>
-		<opt>Type=InnoDB</opt> <index name="SeTicketsRel_IDX0">
+		<index name="seticketsrel_ticketid_idx">
 			<col>ticketid</col>
 		</index>
-		
-		<data>
-		</data>
-	</table>
-
-
-	<table name="seticketsrel" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_SeTicketsRel2 FOREIGN KEY (ticketid) REFERENCES troubletickets(ticketid) ON DELETE CASCADE</constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="headers">
 		<field name="fileid" type="I" size="3">
-			<KEY/>
-			<AUTOINCREMENT/>
+			<key />
+			<autoincrement />
 		</field>
 		<field name="headernames" type="C" size="30">
-			<NOTNULL/>
-		</field>
-		<data>
-		</data>
-	</table>
-
+			<notnull />
+		</field>
+	</table>
 
 	<table name="import_maps">
 		<field name="id" type="I" size="19">
-			<KEY/>
-			<AUTOINCREMENT/>
+			<key />
+			<autoincrement />
 		</field>
 		<field name="name" type="C" size="36">
-			<NOTNULL/>
+			<notnull />
 		</field>
 		<field name="module" type="C" size="36">
-			<NOTNULL/>
-		</field>
-		<field name="content" type="B"></field>
+			<notnull />
+		</field>
+		<field name="content" type="B" />
 		<field name="has_header" type="I" size="1">
-			<NOTNULL/>
-			<DEFAULT value="1"/>
+			<notnull />
+			<default value="1" />
 		</field>
 		<field name="deleted" type="I" size="1">
-			<NOTNULL/>
-			<DEFAULT value="0"/>
+			<notnull />
+			<default value="0" />
 		</field>
 		<field name="date_entered" type="T">
-			<NOTNULL/>
-			<DEFTIMESTAMP/>
+			<notnull />
+			<deftimestamp />
 		</field>
 		<field name="date_modified" type="T">
-			<NOTNULL/>
-			<DEFTIMESTAMP/>
-		</field>
-		<field name="assigned_user_id" type="C" size="36"></field>
+			<notnull />
+			<deftimestamp />
+		</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="idx_import_maps">
+			<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>
-		<data>
-		</data>
-	</table>
-
-
-
+	</table>
 
 	<table name="leadgrouprelation">
 		<field name="leadid" type="I" size="19">
+			<constraint>REFERENCES leaddetails(leadid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="groupname" type="C" size="100">
-		</field>		
-		<opt>Type=InnoDB</opt>
-
-	       	<index name="leadgrouprelation_IDX0">
+			<constraint>REFERENCES groups(name) ON DELETE CASCADE</constraint>
+		</field>
+
+		<index name="leadgrouprelation_leadid_idx">
 			<col>leadid</col>
 		</index>
-
-		<index name="leadgrouprelation_IDX1">
+		<index name="leadgrouprelation_groupname_idx">
 			<col>groupname</col>
 		</index>
-		<data>		
-		</data>
-	</table>
-
-
-	<table name="leadgrouprelation" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_leadgrouprelation FOREIGN KEY (leadid) REFERENCES leaddetails(leadid) ON DELETE CASCADE</constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
-
-	<table name="leadgrouprelation" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_leadgrouprelation2 FOREIGN KEY (groupname) REFERENCES groups(name) ON DELETE CASCADE</constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="activitygrouprelation">
 		<field name="activityid" type="I" size="19">
+			<constraint>REFERENCES activity(activityid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="groupname" type="C" size="100">
-		</field>		
-
-	       	<index name="activitygrouprelation_IDX0">
+			<constraint>REFERENCES groups(name) ON DELETE CASCADE</constraint>
+		</field>
+
+		<index name="activitygrouprelation_activityid_idx">
 			<col>activityid</col>
 		</index>
-
-		<index name="activitygrouprelation_IDX1">
+		<index name="activitygrouprelation_groupname_idx">
 			<col>groupname</col>
 		</index>
-		<data>		
-		</data>
-
-		<opt>Type=InnoDB</opt>
-	</table>
-
-
-	<table name="activitygrouprelation" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_activitygrouprelation1 FOREIGN KEY (activityid) REFERENCES activity(activityid) ON DELETE CASCADE</constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
-	<table name="activitygrouprelation" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_activitygrouprelation2 FOREIGN KEY (groupname) REFERENCES groups(name) ON DELETE CASCADE</constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-        <table name="ticketgrouprelation">
-                <field name="ticketid" type="I" size="19">
-                </field>
-                <field name="groupname" type="C" size="100">
-		</field>
-
-		<index name="ticketgrouprelation_IDX0">
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
+
+	<table name="ticketgrouprelation">
+		<field name="ticketid" type="I" size="19">
+			<constraint>REFERENCES troubletickets(ticketid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="groupname" type="C" size="100">
+			<constraint>REFERENCES groups(name) ON DELETE CASCADE</constraint>
+		</field>
+
+		<index name="ticketgrouprelation_ticketid_idx">
 			<col>ticketid</col>
 		</index>
-
-		<index name="ticketgrouprelation_IDX1">
+		<index name="ticketgrouprelation_groupname_idx">
 			<col>groupname</col>
 		</index>
-		<data>
-
-                </data>
-
-                <opt>Type=InnoDB</opt>
-        </table>
-
-
-        <table name="ticketgrouprelation" alter="true">
-
-                <constraint>ADD CONSTRAINT fk_ticketgrouprelation1 FOREIGN KEY (ticketid) REFERENCES troubletickets(ticketid) ON DELETE CASCADE</constraint>
-
-                <opt>Type=InnoDB</opt>
-
-                <data>
-                </data>
-        </table>
-
-        <table name="ticketgrouprelation" alter="true">
-
-                <constraint>ADD CONSTRAINT fk_ticketgrouprelation2 FOREIGN KEY (groupname) REFERENCES groups(name) ON DELETE CASCADE</constraint>
-
-                <opt>Type=InnoDB</opt>
-
-                <data>
-                </data>
-        </table>
-
-
-        <table name="systems">
-                <field name="id" type="I" size="19">
-                        <KEY/>
-                </field>
-                <field name="server" type="C" size="30"> </field>
-                <field name="server_username" type="C" size="30"> </field>
-                <field name="server_password" type="C" size="30"> </field>
-                <field name="server_type" type="C" size="20"> </field>
-                <data>
-                </data>
-        </table>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
+
+	<table name="systems">
+		<field name="id" type="I" size="19">
+			<key />
+		</field>
+		<field name="server" type="C" size="30" />
+		<field name="server_username" type="C" size="30" />
+		<field name="server_password" type="C" size="30" />
+		<field name="server_type" type="C" size="20" />
+	</table>
 
 	<table name="currency_info">
-                <field name="currency_name" type="C" size="100">
-                        <KEY/>
-                </field>
-                <field name="currency_code" type="C" size="100"> </field>
-                <field name="currency_symbol" type="C" size="30"> </field>
-                <data>
-                </data>
-        </table>
-
+		<field name="currency_name" type="C" size="100">
+			<key />
+		</field>
+		<field name="currency_code" type="C" size="100" />
+		<field name="currency_symbol" type="C" size="30" />
+	</table>
 
 	<table name="defaultcv">
 		<field name="tabid" type="I" size="19">
-			<KEY/>
-		</field>
-			<field name="defaultviewname" type="C" size="50">
-                        <NOTNULL/>
-                </field>
-		<field name="query" type="X"></field>
-		<data>
-		</data>
-	</table>
-
-
-
-
-	<table name="defaultcv" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_defaultcv FOREIGN KEY (tabid) REFERENCES tab(tabid) ON DELETE CASCADE</constraint>
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
+			<key />
+			<constraint>REFERENCES tab(tabid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="defaultviewname" type="C" size="50">
+			<notnull />
+		</field>
+		<field name="query" type="X" />
+	</table>
 
 	<table name="emails">
 		<field name="emailid" type="I" size="19">
-			<KEY/>
-		</field>
-			<field name="filename" type="C" size="50">
-                </field>
-		<field name="description" type="X"></field>
-		<data>
-		</data>
-	</table>
-
-
-
-
-	<table name="emails" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_emails FOREIGN KEY (emailid) REFERENCES activity(activityid) ON DELETE CASCADE</constraint>
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
+			<key />
+			<constraint>REFERENCES activity(activityid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="filename" type="C" size="50" />
+		<field name="description" type="X" />
+	</table>
 
 	<table name="emailtemplates">
-		<field name="foldername" type="C" size="100">
-		</field>
-		<field name="templatename" type="C" size="100">
-		</field>
-		<field name="subject" type="C" size="100">
-		</field>
-		<field name="description" type="X"></field>
-		<field name="body" type="X"></field>
+		<field name="foldername" type="C" size="100" />
+		<field name="templatename" type="C" size="100" />
+		<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"/>
+			<notnull />
+			<default value="0" />
 		</field>
 		<field name="templateid" type="I" size="19">
-                    <KEY/>
-                     <AUTOINCREMENT/></field>
-		<index name="idx_emailtemplates">
+			<key />
+			<autoincrement />
+		</field>
+
+		<index name="emailtemplates_foldernamd_templatename_subject_idx">
 			<col>foldername</col>
 			<col>templatename</col>
 			<col>subject</col>
 		</index>
-		<data>
-		</data>
-	</table>
-
-	 <table name="faq">
+	</table>
+
+	<table name="faq">
 		<field name="id" type="I" size="11">
-			<KEY/>
-			<AUTOINCREMENT/>
-		</field>
-		<field name="product_id" type="C" size="100"></field>
+			<key />
+			<autoincrement />
+			<constraint>REFERENCES crmentity(crmid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="product_id" type="C" size="100" />
 		<field name="question" type="X">
-			<NOTNULL/>
-		</field>
-		<field name="answer" type="X"></field>
+			<notnull />
+		</field>
+		<field name="answer" type="X" />
 		<field name="category" type="C" size="100">
-			<NOTNULL/>
+			<notnull />
 		</field>
 		<field name="status" type="C" size="100">
-			<NOTNULL/>
-		</field>
-		<opt>Type=InnoDB</opt>
-			<index name="faq_IDX0">
-                                <col>id</col>
-                        </index>
-				
-		<data>
-		</data>
-	</table>
-	<table name="faq" alter="true">
-
-                <constraint>ADD CONSTRAINT fk_faqCF FOREIGN KEY (id) REFERENCES crmentity(crmid)  ON DELETE CASCADE </constraint>
-
-                <opt>Type=InnoDB</opt>
-
-                <data>
-                </data>
-        </table>
+			<notnull />
+		</field>
+
+		<index name="faq_id_idx">
+			<col>id</col>
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="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>
-		<field name="createdtime" type="T" >
-			<DEFTIMESTAMP/>
-                        <NOTNULL/>
-                </field>
-
-		<opt>Type=InnoDB</opt>
-                        <index name="faqcomments_IDX0">
-                                <col>faqid</col>
-                        </index>
-
-                <data>
-                </data>
-	</table>
-	<table name="faqcomments" alter="true">
-
-                <constraint>ADD CONSTRAINT fk_faqcommentsCF FOREIGN KEY (faqid) REFERENCES faq(id)  ON DELETE CASCADE </constraint>
-
-                <opt>Type=InnoDB</opt>
-
-                <data>
-                </data>
-        </table>
+			<key />
+			<autoincrement />
+		</field>
+		<field name="faqid" type="I" size="19">
+			<constraint>REFERENCES faq(id) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="comments" type="X" />
+		<field name="createdtime" type="T">
+			<deftimestamp />
+			<notnull />
+		</field>
+
+		<index name="faqcomments_faqid_idx">
+			<col>faqid</col>
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="files">
 		<field name="id" type="C" size="36">
-			<KEY/>
-		</field>
-		<field name="name" type="C" size="36"></field>
-		<field name="content" type="B"></field>
+			<key />
+		</field>
+		<field name="name" type="C" size="36" />
+		<field name="content" type="B" />
 		<field name="deleted" type="I" size="1">
-			<NOTNULL/>
-			<DEFAULT value="0"/>
+			<notnull />
+			<default value="0" />
 		</field>
 		<field name="date_entered" type="T">
-			<NOTNULL/>
-			<DEFTIMESTAMP/>
-		</field>
-		<field name="assigned_user_id" type="C" size="36"></field>
-		<index name="idx_cont_owner_id_and_name">
+			<notnull />
+			<deftimestamp />
+		</field>
+		<field name="assigned_user_id" type="C" size="36" />
+
+		<index name="files_assigned_user_id_name_deleted_idx">
 			<col>assigned_user_id</col>
 			<col>name</col>
 			<col>deleted</col>
 		</index>
-		<data>
-		</data>
-	</table>
-
-
+	</table>
 
 	<table name="loginhistory">
 		<field name="login_id" type="I" size="11">
-			<KEY/>
-			<AUTOINCREMENT/>
+			<key />
+			<autoincrement />
 		</field>
 		<field name="user_name" type="C" size="25">
-			<NOTNULL/>
+			<notnull />
 		</field>
 		<field name="user_ip" type="C" size="25">
-			<NOTNULL/>
+			<notnull />
 		</field>
 		<field name="logout_time" type="T">
-			<DEFTIMESTAMP/>
+			<deftimestamp />
 		</field>
 		<field name="login_time" type="T">
-			<DEFTIMESTAMP/>
-		</field>
-		<field name="status" type="C" size="25">			
-		</field>
-		<data>
-		
-		</data>
-	</table>
-
+			<deftimestamp />
+		</field>
+		<field name="status" type="C" size="25" />
+	</table>
 
 	<table name="senotesrel">
 		<field name="crmid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
+			<key />
+			<default value="0" />
+			<constraint>REFERENCES crmentity(crmid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="notesid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
-		</field>
-		<opt>Type=InnoDB</opt> <index name="SeNotesRel_IDX0">
+			<key />
+			<default value="0" />
+			<constraint>REFERENCES notes(notesid) ON DELETE CASCADE</constraint>
+		</field>
+
+		<index name="senotesrel_notesid_idx">
 			<col>notesid</col>
 		</index>
-		<opt>Type=InnoDB</opt> <index name="SeNotesRel_IDX1">
+		<index name="senotesrel_crmid_idx">
 			<col>crmid</col>
 		</index>
-		<data>
-		</data>
-	</table>
-
-
-
-	<table name="senotesrel" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_SeNotesRel FOREIGN KEY (notesid) REFERENCES notes(notesid) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
-	<table name="senotesrel" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_SeNotesRel2 FOREIGN KEY (crmid) REFERENCES crmentity(crmid) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
-
-
-
-
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="role2action">
-		<field name="rolename" type="C" size="50">
-		</field>
+		<field name="rolename" type="C" size="50" />
 		<field name="tabid" type="I" size="11">
-			<DEFAULT value="0"/>
-		</field>
-		<field name="actionname" type="C" size="100">
-		</field>
+			<default value="0" />
+		</field>
+		<field name="actionname" type="C" size="100" />
 		<field name="action_permission" type="I" size="4">
-			<NOTNULL/>
-			<DEFAULT value="0"/>
-		</field>
-		<field name="description" type="C" size="100">
-		</field>
-		<index name="idx_role2action_name">
+			<notnull />
+			<default value="0" />
+		</field>
+		<field name="description" type="C" size="100" />
+
+		<index name="role2action_rolename_tabid_actionname_idx">
 			<col>rolename</col>
 			<col>tabid</col>
 			<col>actionname</col>
 		</index>
-		<data>
-		
-		</data>
-	</table>
+	</table>
+
 	<table name="role2tab">
-		<field name="rolename" type="C" size="100">
-		</field>
+		<field name="rolename" type="C" size="100" />
 		<field name="tabid" type="I" size="11">
-			<DEFAULT value="0"/>
+			<default value="0" />
 		</field>
 		<field name="module_permission" type="I" size="4">
-			<NOTNULL/>
-			<DEFAULT value="0"/>
-		</field>
-		<field name="description" type="C" size="100">
-		</field>
-		<index name="idx_role2tab_name">
+			<notnull />
+			<default value="0" />
+		</field>
+		<field name="description" type="C" size="100" />
+
+		<index name="role2tab_rolename_tabid_idx">
 			<col>rolename</col>
 			<col>tabid</col>
 		</index>
-		<data>
-		
-		</data>
-	</table>
-
-<table name="ticketstracktime">
+	</table>
+
+	<table name="ticketstracktime">
 		<field name="ticket_id" type="I" size="11">
-			<NOTNULL/>
-			<DEFAULT value="0"/>
+			<notnull />
+			<default value="0" />
 		</field>
 		<field name="supporter_id" type="I" size="11">
-			<NOTNULL/>
-			<DEFAULT value="0"/>
+			<notnull />
+			<default value="0" />
 		</field>
 		<field name="minutes" type="I" size="11">
-			<DEFAULT value="0"/>
+			<default value="0" />
 		</field>
 		<field name="date_logged" type="I" size="11">
-			<NOTNULL/>
-			<DEFAULT value="0"/>
-		</field>
-		<index name="idx_ticketstracktime">
+			<notnull />
+			<default value="0" />
+		</field>
+
+		<index name="ticketstracktime_ticket_id_idx">
 			<col>ticket_id</col>
 		</index>
-		<data>
-		</data>
-	</table>
-
+	</table>
 
 	<table name="ticketcf">
 		<field name="ticketid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
-		</field>
-		<opt>Type=InnoDB</opt> 
-		<data>
-		</data>
-	</table>
-
-
-	<table name="ticketcf" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_HelpDeskCF FOREIGN KEY (ticketid) REFERENCES troubletickets(ticketid)  ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-	
+			<key />
+			<default value="0" />
+			<constraint>REFERENCES troubletickets(ticketid) ON DELETE CASCADE</constraint>
+		</field>
+
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
+
 	<table name="productcf">
 		<field name="productid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
-		</field>
-		<opt>Type=InnoDB</opt>
-		<data>
-		</data>
-	</table>
-
-
-	<table name="productcf" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_ProductCF FOREIGN KEY (productid) REFERENCES products(productid)  ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
-
+			<key />
+			<default value="0" />
+			<constraint>REFERENCES products(productid) ON DELETE CASCADE</constraint>
+		</field>
+
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="users_last_import">
 		<field name="id" type="I" size="36">
-			<AUTOINCREMENT/>
-			<KEY/>
-		</field>
-		<field name="assigned_user_id" type="C" size="36"></field>
-		<field name="bean_type" type="C" size="36"></field>
-		<field name="bean_id" type="C" size="36"></field>
+			<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>
+			<notnull />
+			<default value="0" />
+		</field>
+
 		<index name="idx_user_id">
 			<col>assigned_user_id</col>
 		</index>
-		<data>
-		</data>
-	</table>
-
+	</table>
 
 	<table name="wordtemplates">
-	     <field name="templateid" type="I" size="19">
-	         <KEY/>
-	     </field>
+		<field name="templateid" type="I" size="19">
+			<key />
+		</field>
 		<field name="filename" type="C" size="100">
-			<NOTNULL/>
+			<notnull />
 		</field>
 		<field name="module" type="C" size="30">
-			<NOTNULL/>
+			<notnull />
 		</field>
 		<field name="date_entered" type="T">
-			<NOTNULL/>
-			<DEFTIMESTAMP/>
+			<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>
+			<notnull />
+		</field>
+		<field name="data" type="B">
+			<notnull />
+		</field>
+		<field name="description" type="X" />
 		<field name="filesize" type="C" size="50">
-			<NOTNULL/>
+			<notnull />
 		</field>
 		<field name="filetype" type="C" size="20">
-			<NOTNULL/>
+			<notnull />
 		</field>
 		<field name="deleted" type="I" size="1">
-			<NOTNULL/>
-			<DEFAULT value="0"/>
-		</field>
-		<data>
-		</data>
-	</table>
-
-
-
-
-
-
-
-
-<!-- Dropdown fields -->	
+			<notnull />
+			<default value="0" />
+		</field>
+	</table>
+
+	<!-- Dropdown fields -->
 	<table name="accountdepstatus">
 		<field name="deploymentstatusid" type="I" size="19">
-			<KEY/>
-	<AUTOINCREMENT/>
-			
+			<key />
+			<autoincrement />
 		</field>
 		<field name="deploymentstatus" 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>
-		<opt>Type=InnoDB</opt> <index name="AccountDepStatus_UK0">
-			<UNIQUE/>
+			<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="accountdepstatus_deploymentstatus_idx">
 			<col>deploymentstatus</col>
-		</index>
-		<data>
-		</data>
-	</table>
-
-
-
-
-
-
-
-
-
+			<unique />
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="accountownership">
 		<field name="acctownershipid" type="I" size="19">
-			<KEY/>
-	<AUTOINCREMENT/>
+			<key />
+			<autoincrement />
 		</field>
 		<field name="ownership" 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>
-		<opt>Type=InnoDB</opt> <index name="AccountOwnership_UK0">
-			<UNIQUE/>
+			<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="accountownership_ownership_idx">
 			<col>ownership</col>
-		</index>
-		<data>
-		</data>
-	</table>
+			<unique />
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
+
 	<table name="accountrating">
 		<field name="accountratingid" type="I" size="19">
-			<KEY/>
-	<AUTOINCREMENT/>
-			
+			<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>
-		<opt>Type=InnoDB</opt> <index name="AccountRating_UK0">
-			<UNIQUE/>
+			<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>
-		</index>
-		<data>
-		</data>
-	</table>
+			<unique />
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
+
 	<table name="accountregion">
 		<field name="accountregionid" type="I" size="19">
-			<KEY/>
-	<AUTOINCREMENT/>
-				</field>
+			<key />
+			<autoincrement />
+		</field>
 		<field name="region" 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>
-		<opt>Type=InnoDB</opt> <index name="AccountRegion_UK0">
-			<UNIQUE/>
+			<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="accountregion_region_idx">
 			<col>region</col>
-		</index>
-		<data>
-		</data>
+			<unique />
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="accounttype">
 		<field name="accounttypeid" type="I" size="19">
-			<KEY/>
-<AUTOINCREMENT/>
-		
+			<key />
+			<autoincrement />
 		</field>
 		<field name="accounttype" 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>
-		<opt>Type=InnoDB</opt> <index name="AccountType_UK0">
-			<UNIQUE/>
+			<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="accounttype_accounttype_idx">
 			<col>accounttype</col>
-		</index>
-		<data>
-
-		</data>
-	</table>
-
+			<unique />
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="contacttype">
 		<field name="contacttypeid" type="I" size="19">
-			<KEY/>
-<AUTOINCREMENT/>
-		
+			<key />
+			<autoincrement />
 		</field>
 		<field name="contacttype" 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>
-		<opt>Type=InnoDB</opt> <index name="ContactType_UK0">
-			<UNIQUE/>
+			<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="contacttype_contacttype_idx">
 			<col>contacttype</col>
-		</index>
-		<data>
-
-		</data>
+			<unique />
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="leadsource">
 		<field name="leadsourceid" type="I" size="19">
-			<KEY/>
-	<AUTOINCREMENT/>
-		
+			<key />
+			<autoincrement />
 		</field>
 		<field name="leadsource" 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>
-		<opt>Type=InnoDB</opt> <index name="LeadSource_UK0">
-			<UNIQUE/>
+			<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="leadsource_source_idx">
 			<col>source</col>
-		</index>
-		<data>
-		</data>
-	</table>
-	
+			<unique />
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
+
 	<table name="opportunity_type">
-               <field name="opptypeid" type="I" size="19">
-                       <KEY/>
-       <AUTOINCREMENT/>
-
-               </field>
-               <field name="opportunity_type" 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>
-               <opt>Type=InnoDB</opt> <index name="Opportunity_UK0">
-                       <UNIQUE/>
-                       <col>opportunity_type</col>
-               </index>
-               <data>
-               </data>
-       </table>
+		<field name="opptypeid" type="I" size="19">
+			<key />
+			<autoincrement />
+		</field>
+		<field name="opportunity_type" 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="opportunity_type_opportunity_type_idx">
+			<col>opportunity_type</col>
+			<unique />
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="leadstage">
 		<field name="leadstageid" type="I" size="19">
-			<KEY/><AUTOINCREMENT/>
-
-		
+			<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>
-		<opt>Type=InnoDB</opt> <index name="LeadStage_UK0">
-			<UNIQUE/>
+			<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>
-		</index>
-		<data>
-		</data>
-	</table>
+			<unique />
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
+
 	<table name="leadstatus">
 		<field name="leadstatusid" type="I" size="19">
-			<KEY/>
-<AUTOINCREMENT/>
-		
+			<key />
+			<autoincrement />
 		</field>
 		<field name="leadstatus" 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>
-		<opt>Type=InnoDB</opt> <index name="LeadStatus_UK0">
-			<UNIQUE/>
+			<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="leadstatus_status_idx">
 			<col>status</col>
-		</index>
-		<data>
-			
-		</data>
+			<unique />
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="eventstatus">
-                <field name="eventstatusid" type="I" size="19">
-                        <KEY/>
-        <AUTOINCREMENT/>
-
-                </field>
-                <field name="eventstatus" 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>
-                <opt>Type=InnoDB</opt> <index name="EventStatus_UK0">
-                        <UNIQUE/>
-                        <col>status</col>
-                </index>
-                <data>
-
-                </data>
-        </table>
+		<field name="eventstatusid" type="I" size="19">
+			<key />
+			<autoincrement />
+		</field>
+		<field name="eventstatus" 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="eventstatus_status_idx">
+			<col>status</col>
+			<unique />
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="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>
-                <opt>Type=InnoDB</opt> <index name="DurationMinutes_UK0">
-                        <UNIQUE/>
-                        <col>status</col>
-                </index>
-                <data>
-
-                </data>
-        </table>
+		<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">Type=InnoDB</opt>
+	</table>
 
 	<table name="licencekeystatus">
 		<field name="licencekeystatusid" type="I" size="19">
-			<KEY/><AUTOINCREMENT/>
-
-		
+			<key />
+			<autoincrement />
 		</field>
 		<field name="licencekeystatus" 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>
-		<opt>Type=InnoDB</opt> <index name="LicenceKeyStatus_UK0">
-			<UNIQUE/>
+			<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="licencekeystatus_status_idx">
 			<col>status</col>
-		</index>
-		<data>
-		</data>
-	</table>
-
-
-
+			<unique />
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="opportunitystage">
 		<field name="potstageid" type="I" size="19">
-			<KEY/>
-<AUTOINCREMENT/>
-		
+			<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>
-
+			<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="7.3">
-			<DEFAULT value="0"/>
-		</field>
-		<opt>Type=InnoDB</opt> <index name="OpportunityStage_UK0">
-			<UNIQUE/>
+			<default value="0" />
+		</field>
+
+		<index name="opportunitystage_stage_idx">
 			<col>stage</col>
-		</index>
-		<data>
-		</data>
-	</table>
-	
-
-
+			<unique />
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="priority">
 		<field name="priorityid" type="I" size="19">
-			<KEY/><AUTOINCREMENT/>
-
-		
+			<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>
-		<opt>Type=InnoDB</opt> <index name="Priority_UK0">
-			<UNIQUE/>
+			<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>
-		</index>
-		<data>
-		</data>
-	</table>
-
+			<unique />
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="businesstype">
 		<field name="businesstypeid" type="I" size="19">
-			<KEY/>
-<AUTOINCREMENT/>
-		
+			<key />
+			<autoincrement />
 		</field>
 		<field name="businesstype" 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>
-		<opt>Type=InnoDB</opt> <index name="BusinessType_UK0">
-			<UNIQUE/>
+			<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="businesstype_businesstype_idx">
 			<col>businesstype</col>
-		</index>
-		<data>
-		</data>
-	</table>
-	
+			<unique />
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="industry">
 		<field name="industryid" type="I" size="19">
-			<KEY/>
-<AUTOINCREMENT/>
-		
+			<key />
+			<autoincrement />
 		</field>
 		<field name="industry" 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>
-		<opt>Type=InnoDB</opt> <index name="Industry_UK0">
-			<UNIQUE/>
+			<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="industry_industry_idx">
 			<col>industry</col>
-		</index>
-		<data>
-		</data>
-	</table>
-
+			<unique />
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="revenuetype">
 		<field name="revenuetypeid" type="I" size="19">
-			<KEY/><AUTOINCREMENT/>
-
-		
+			<key />
+			<autoincrement />
 		</field>
 		<field name="revenuetype" 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>
-		<opt>Type=InnoDB</opt> <index name="RevenueType_UK0">
-			<UNIQUE/>
+			<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="revenuetype_revenuetype_idx">
 			<col>revenuetype</col>
-		</index>
-		<data>
-		</data>
+			<unique />
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="salutationtype">
 		<field name="salutationid" type="I" size="19">
-			<KEY/><AUTOINCREMENT/>
-
-					</field>
+			<key />
+			<autoincrement />
+		</field>
 		<field name="salutationtype" 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>
-		<data>
-		</data>
-	</table>
- 
-
+			<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>
+	</table>
 
 	<table name="taskpriority">
 		<field name="taskpriorityid" type="I" size="19">
-			<KEY/><AUTOINCREMENT/>
-
-		
-		</field>
-		<field name="taskpriority" type="C" size="100"></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>
-		<data>
-		</data>
-            
-	</table>
+			<key />
+			<autoincrement />
+		</field>
+		<field name="taskpriority" type="C" size="100" />
+		<field name="sortorderid" type="I" size="19">
+			<notnull />
+			<default value="0" />
+		</field>
+		<field name="presence" type="I" size="1">
+			<notnull />
+			<default value="1" />
+		</field>
+	</table>
+
 	<table name="taskstatus">
 		<field name="taskstatusid" type="I" size="19">
-			<KEY/>
-<AUTOINCREMENT/>
-		
-		</field>
-		<field name="taskstatus" type="C" size="100"></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>
-		<data>
-		</data>
+			<key />
+			<autoincrement />
+		</field>
+		<field name="taskstatus" type="C" size="100" />
+		<field name="sortorderid" type="I" size="19">
+			<notnull />
+			<default value="0" />
+		</field>
+		<field name="presence" type="I" size="1">
+			<notnull />
+			<default value="1" />
+		</field>
 	</table>
 
 	<table name="activitytype">
 		<field name="activitytypeid" type="I" size="19">
-			<KEY/>
-	<AUTOINCREMENT/>
-		
+			<key />
+			<autoincrement />
 		</field>
 		<field name="activitytype" 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>
-		<opt>Type=InnoDB</opt> <index name="ActivityType_UK0">
-			<UNIQUE/>
+			<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="activitytype_activitytype_idx">
 			<col>activitytype</col>
-		</index>
-		<data>
-		</data>
-	</table>
-
+			<unique />
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="usertype">
 		<field name="usertypeid" type="I" size="19">
-			<KEY/><AUTOINCREMENT/>
-
-		
+			<key />
+			<autoincrement />
 		</field>
 		<field name="usertype" 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>
-		<opt>Type=InnoDB</opt> <index name="UserType_UK0">
-			<UNIQUE/>
+			<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="usertype_usertype_idx">
 			<col>usertype</col>
-		</index>
-		<data>
-		</data>
-	</table>
-
-
+			<unique />
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="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="SORTORDERID" type="I" size="19">
-			<NOTNULL/>
-			<DEFAULT value="0"/>
+		<field name="sales_stage_id" type="I" size="19">
+			<key />
+			<autoincrement />
+		</field>
+		<field name="sales_stage" type="C" size="200">
+		</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>
-	
-		<data>
-		
-		</data>
+			<notnull />
+			<default value="1" />
+		</field>
 	</table>
 
 	<table name="faqcategories">
-<field name="faqcategories_id" type="I" size="19">
-			<KEY/>
-<AUTOINCREMENT/>
-			</field>
-		<field name="faqcategories" type="C" size="60">
-	
-		</field>
-	<field name="SORTORDERID" type="I" size="19">
-			<NOTNULL/>
-			<DEFAULT value="0"/>
+		<field name="faqcategories_id" type="I" size="19">
+			<key />
+			<autoincrement />
+		</field>
+		<field name="faqcategories" type="C" size="60" />
+		<field name="SORTORDERID" type="I" size="19">
+			<notnull />
+			<default value="0" />
 		</field>
 		<field name="PRESENCE" type="I" size="1">
-			<NOTNULL/>
-			<DEFAULT value="1"/>
-		</field>
-	
-		<data>
-		
-		</data>
-	</table>
+			<notnull />
+			<default value="1" />
+		</field>
+	</table>
+
 	<table name="faqstatus">
 		<field name="faqstatus_id" type="I" size="19">
-			<KEY/>
-			<AUTOINCREMENT/>
-		</field>
-		<field name="faqstatus" type="C" size="60"></field>
+			<key />
+			<autoincrement />
+		</field>
+		<field name="faqstatus" type="C" size="60" />
 		<field name="SORTORDERID" type="I" size="19">
-			<NOTNULL/>
-			<DEFAULT value="0"/>
+			<notnull />
+			<default value="0" />
 		</field>
 		<field name="PRESENCE" type="I" size="1">
-			<NOTNULL/>
-			<DEFAULT value="1"/>
-		</field>
-	
-		<data>
-		
-		</data>
-	</table>
-
-
-
+			<notnull />
+			<default value="1" />
+		</field>
+	</table>
 
 	<table name="rating">
-<field name="rating_id" type="I" size="19">
-			<KEY/>
-<AUTOINCREMENT/>
-		
-		</field>
-
-		<field name="rating" type="C" size="200">
-		</field>
-	<field name="SORTORDERID" type="I" size="19">
-			<NOTNULL/>
-			<DEFAULT value="0"/>
+		<field name="rating_id" type="I" size="19">
+			<key />
+			<autoincrement />
+		</field>
+		<field name="rating" type="C" size="200" />
+		<field name="SORTORDERID" type="I" size="19">
+			<notnull />
+			<default value="0" />
 		</field>
 		<field name="PRESENCE" type="I" size="1">
-			<NOTNULL/>
-			<DEFAULT value="1"/>
-		</field>
-	
-		<data>
-		
-		</data>
-	</table>
-
+			<notnull />
+			<default value="1" />
+		</field>
+	</table>
 
 	<table name="ticketcategories">
-<field name="ticketcategories_id" type="I" size="19">
-			<KEY/>
-<AUTOINCREMENT/>
-		
-		</field>
-	<field name="ticketcategories" type="C" size="100">
-		</field>
-	<field name="SORTORDERID" type="I" size="19">
-			<NOTNULL/>
-			<DEFAULT value="0"/>
+		<field name="ticketcategories_id" type="I" size="19">
+			<key />
+			<autoincrement />
+		</field>
+		<field name="ticketcategories" type="C" size="100" />
+		<field name="SORTORDERID" type="I" size="19">
+			<notnull />
+			<default value="0" />
 		</field>
 		<field name="PRESENCE" type="I" size="1">
-			<NOTNULL/>
-			<DEFAULT value="0"/>
-		</field>
-	
-		<data>
-		
-		</data>
+			<notnull />
+			<default value="0" />
+		</field>
 	</table>
 
 	<table name="ticketpriorities">
-<field name="ticketpriorities_id" type="I" size="19">
-			<KEY/>
-<AUTOINCREMENT/>
-				</field>
-		<field name="ticketpriorities" type="C" size="100">
-				</field>
-
-	<field name="SORTORDERID" type="I" size="19">
-			<NOTNULL/>
-			<DEFAULT value="0"/>
+		<field name="ticketpriorities_id" type="I" size="19">
+			<key />
+			<autoincrement />
+		</field>
+		<field name="ticketpriorities" type="C" size="100" />
+		<field name="SORTORDERID" type="I" size="19">
+			<notnull />
+			<default value="0" />
 		</field>
 		<field name="PRESENCE" type="I" size="1">
-			<NOTNULL/>
-			<DEFAULT value="0"/>
-		</field>
-	
-		<data>
-		
-		</data>
-	</table>
+			<notnull />
+			<default value="0" />
+		</field>
+	</table>
+
 	<table name="ticketseverities">
 		<field name="ticketseverities_id" type="I" size="19">
-			<KEY/>
-			<AUTOINCREMENT/>
-		</field>
-		<field name="ticketseverities" type="C" size="100">
-				</field>
-
+			<key />
+			<autoincrement />
+		</field>
+		<field name="ticketseverities" type="C" size="100" />
 		<field name="SORTORDERID" type="I" size="19">
-			<NOTNULL/>
-			<DEFAULT value="0"/>
+			<notnull />
+			<default value="0" />
 		</field>
 		<field name="PRESENCE" type="I" size="1">
-			<NOTNULL/>
-			<DEFAULT value="0"/>
-		</field>
-	
-		<data>
-		
-		</data>
-	</table>
+			<notnull />
+			<default value="0" />
+		</field>
+	</table>
+
 	<table name="ticketstatus">
-<field name="ticketstatus_id" type="I" size="19">
-			<KEY/>
-<AUTOINCREMENT/>
-		
-		</field>
-		<field name="ticketstatus" type="C" size="60">
-			</field>
-	<field name="SORTORDERID" type="I" size="19">
-			<NOTNULL/>
-			<DEFAULT value="0"/>
+		<field name="ticketstatus_id" type="I" size="19">
+			<key />
+			<autoincrement />
+		</field>
+		<field name="ticketstatus" type="C" size="60" />
+		<field name="SORTORDERID" type="I" size="19">
+			<notnull />
+			<default value="0" />
 		</field>
 		<field name="PRESENCE" type="I" size="1">
-			<NOTNULL/>
-			<DEFAULT value="0"/>
-		</field>
-	
-		<data>
-		
-		</data>
-
-	</table>
-
-
-
-
-
-
+			<notnull />
+			<default value="0" />
+		</field>
+	</table>
 
 	<table name="activsubtype">
 		<field name="activesubtypeid" type="I" size="19">
-			<KEY/>
-<AUTOINCREMENT/>
-		</field>
-		<field name="activsubtype" type="C" size="100"></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>
-		<data>
-
-		</data>
-	</table>
-
-
-
-
+			<key />
+			<autoincrement />
+		</field>
+		<field name="activsubtype" type="C" size="100" />
+		<field name="sortorderid" type="I" size="19">
+			<notnull />
+			<default value="0" />
+		</field>
+		<field name="presence" type="I" size="1">
+			<notnull />
+			<default value="1" />
+		</field>
+	</table>
 
 	<table name="downloadpurpose">
 		<field name="downloadpurposeid" type="I" size="19">
-			<KEY/>
-	<AUTOINCREMENT/>
+			<key />
+			<autoincrement />
 		</field>
 		<field name="purpose" 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>
-		<opt>Type=InnoDB</opt> <index name="DownloadPurpose_UK0">
-			<UNIQUE/>
+			<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="downloadpurpose_purpose_idx">
 			<col>purpose</col>
-		</index>
-		<data>
-		</data>
+			<unique />
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="durationhrs">
 		<field name="hrsid" type="I" size="19">
-			<KEY/>
-<AUTOINCREMENT/>
-
-		</field>
-		<field name="hrs" type="C" size="50"></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>
-		<data>
-		</data>
-	</table>
+			<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>
+	</table>
+
 	<table name="durationmins">
 		<field name="minsid" type="I" size="19">
-			<KEY/>
-<AUTOINCREMENT/>
-		
-		</field>
-		<field name="mins" type="C" size="50"></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>
-		<data>
-		</data>
-	</table>
-	
+			<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>
+	</table>
+
 	<table name="evaluationstatus">
 		<field name="evalstatusid" type="I" size="19">
-			<KEY/>
-<AUTOINCREMENT/>
-			</field>
+			<key />
+			<autoincrement />
+		</field>
 		<field name="status" 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>
-		<opt>Type=InnoDB</opt> <index name="EvaluationStatus_UK0">
-			<UNIQUE/>
+			<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="evaluationstatus_status_idx">
 			<col>status</col>
-		</index>
-		<data>
-		</data>
-	</table>
-	
+			<unique />
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
+
 	<table name="profile">
 		<field name="profileid" type="I" size="10">
-			<KEY/>
-			<AUTOINCREMENT/>
+			<key />
+			<autoincrement />
 		</field>
 		<field name="profilename" type="C" size="50">
-			<NOTNULL/>
-		</field>
-		<data>		
-		</data>
+			<notnull />
+		</field>
 	</table>
 
 	<table name="profile2tab">
-		<field name="profileid" type="I" size="11"></field>
-		<field name="tabid" type="I" size="10"></field>
+		<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_profile2tab">
-			<col>profileid</col>	
+			<notnull />
+			<default value="0" />
+		</field>
+
+		<index name="profile2tab_profileid_tabid_idx">
+			<col>profileid</col>
 			<col>tabid</col>
 		</index>
-
-		
-		<data>
-		</data>
 	</table>
 
 	<table name="profile2standardpermissions">
-		<field name="profileid" type="I" size="11"></field>
-		<field name="tabid" type="I" size="10"></field>
-		<field name="Operation" type="I" size="10"></field>
-		<field name="permissions" type="I" size="1"></field>
-		<index name="idx_prof2stad">
+		<field name="profileid" type="I" size="11" />
+		<field name="tabid" type="I" size="10" />
+		<field name="Operation" type="I" size="10" />
+		<field name="permissions" type="I" size="1" />
+
+		<index name="profile2standardpermissions_profileid_tabid_Operation_idx">
 			<col>profileid</col>
 			<col>tabid</col>
 			<col>Operation</col>
 		</index>
-		<data>
-		</data>
 	</table>
 
 	<table name="profile2field">
-			<field name="profileid" type="I" size="11"></field>
-                	<field name="tabid" type="I" size="10"></field>
-                	<field name="fieldid" type="I" size="19"></field>
-	                <field name="visible" type="I" size="19"></field>
-        	        <field name="readonly" type="I" size="19"></field>
-		<index name="idx_prof2fileid">
+		<field name="profileid" type="I" size="11" />
+		<field name="tabid" type="I" size="10" />
+		<field name="fieldid" type="I" size="19" />
+		<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">
+		<index name="profile2field_tabid_profileid_idx">
 			<col>tabid</col>
 			<col>profileid</col>
 		</index>
-		<index name="profile2field_visible">
+		<index name="profile2field_visible_profileid_idx">
 			<col>visible</col>
 			<col>profileid</col>
 		</index>
-		<data>
-		</data>
-	</table>
-	
+	</table>
+
 	<table name="role2profile">
 		<field name="roleid" type="I" size="11">
-			<KEY/>
-		</field>
-		<field name="profileid" type="I" size="11">
-		</field>
-		
-		<data>
-		
-		</data>
-	</table>
-	
+			<key />
+		</field>
+		<field name="profileid" type="I" size="11" />
+	</table>
 
 	<table name="def_org_share">
 		<field name="ruleid" type="I" size="11">
-			<KEY/>
-                        <AUTOINCREMENT/>
+			<key />
+			<autoincrement />
 		</field>
 		<field name="tabid" type="I" size="11">
-			<NOTNULL/>
-		</field>
-		<field name="permission" type="I" size="10">
-		</field>
-
-		<data>
-		
-		</data>
+			<notnull />
+		</field>
+		<field name="permission" type="I" size="10" />
 	</table>
 
 	<table name="def_org_field">
-                	<field name="tabid" type="I" size="10"></field>
-                	<field name="fieldid" type="I" size="19"></field>
-	                <field name="visible" type="I" size="19"></field>
-        	        <field name="readonly" type="I" size="19"></field>
-			<index name="idx_def_org_field">
-				<col>tabid</col>
-				<col>fieldid</col>
-			</index>
-			<index name="def_org_field_tabid">
-				<col>tabid</col>
-			</index>
-			<index name="def_org_field_visible">
-				<col>visible</col>
-				<col>fieldid</col>
-			</index>	
-		<data>
-		</data>
+		<field name="tabid" type="I" size="10" />
+		<field name="fieldid" type="I" size="19" />
+		<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>
 	</table>
 
 	<table name="profile2utility">
-		<field name="profileid" type="I" size="11"></field>
-		<field name="tabid" type="I" size="11"></field>
-		<field name="activityid" type="I" size="11"></field>
-		<field name="permission" type="I" size="1"></field>
-
-		<index name="idx_prof2utility">
-                        <col>profileid</col>
-                        <col>tabid</col>
-                        <col>activityid</col>
-                </index>
-		<data>
-		
-		</data>
-	</table>
-
-
+		<field name="profileid" type="I" size="11" />
+		<field name="tabid" type="I" size="11" />
+		<field name="activityid" type="I" size="11" />
+		<field name="permission" type="I" size="1" />
+
+		<index name="profile2utility_profileid_tabid_activityid_idx">
+			<col>profileid</col>
+			<col>tabid</col>
+			<col>activityid</col>
+		</index>
+	</table>
 
 	<table name="productcategory">
 		<field name="productcategoryid" type="I" size="19">
-			<KEY/>
-	<AUTOINCREMENT/>
-			
+			<key />
+			<autoincrement />
 		</field>
 		<field name="productcategory" 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>
-		<opt>Type=InnoDB</opt> <index name="ProductCategory_UK0">
-			<UNIQUE/>
+			<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="productcategory_productcategory_idx">
 			<col>productcategory</col>
-		</index>
-		<data>
-		</data>
-	</table>
-
-
+			<unique />
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="notificationscheduler">
-                <field name="schedulednotificationid" type="I" size="19">
-                        <KEY/>
-                        <AUTOINCREMENT/>
-                </field>
-                <field name="schedulednotificationname" type="C" size="200">
-                </field>
-                <field name="active" type="I" size="1">
-                </field>
-                <field name="notificationsubject" type="C" size="200">
-                </field>
-                <field name="notificationbody" type="X" >
-                </field>
-                <field name="label" type="C" size="50">
-                </field>
-                <opt>Type=InnoDB</opt>
-                <index name="notificationscheduler_UK0">
-                        <UNIQUE/>
-                        <col>schedulednotificationname</col>
-                </index>
-                <data>
-                </data>
-        </table>
-
+		<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" />
+
+		<index name="notificationscheduler_schedulednotificationname_idx">
+			<col>schedulednotificationname</col>
+			<unique />
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="activityproductrel">
 		<field name="activityid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
+			<key />
+			<default value="0" />
+			<constraint>REFERENCES activity(activityid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="productid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
-		</field>
-		<opt>Type=InnoDB</opt> <index name="activityproductrel_IDX0">
+			<key />
+			<default value="0" />
+			<constraint>REFERENCES products(productid) ON DELETE CASCADE</constraint>
+		</field>
+
+		<index name="activityproductrel_activityid_idx">
 			<col>activityid</col>
 		</index>
-		<opt>Type=InnoDB</opt> <index name="activityproductRel_IDX1">
+		<index name="activityproductrel_productid_idx">
 			<col>productid</col>
 		</index>
-		<data>
-		</data>
-	</table>
-
-
-
-	<table name="activityproductrel" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_activityproductRel FOREIGN KEY (activityid) REFERENCES activity(activityid) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
-	<table name="activityproductrel" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_activityproductrel1 FOREIGN KEY (productid) REFERENCES products(productid) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="relatedlists">
 		<field name="relation_id" type="I" size="19">
-                        <KEY/>
-                </field>
-		<field name="tabid" type="I" size="10"></field>
-		<field name="related_tabid" type="I" size="10"></field>
-		<field name="name" type="C" size="100"></field>
-		<field name="sequence" type="I" size="10"></field>
-		<field name="label" type="C" size="100"></field>
+			<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>
-		<index name="relatedlists_profile2tab">
-			<col>relation_id</col>	
-		</index>
-		
-		<data>
-		</data>
+			<notnull />
+			<default value="0" />
+		</field>
+
+		<index name="relatedlists_relation_id_idx">
+			<col>relation_id</col>
+		</index>
 	</table>
 
 	<table name="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>
-                <field name="rsstype" type="I" size="10">
-			<DEFAULT value="0"/>
-		</field>
-                <field name="starred" type="I" size="1">
-	              <DEFAULT value="0"/>	
+		<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>
 		<field name="rsscategory" type="C" size="100">
-                        <DEFAULT value=""/>
-                </field>
-                <data>
-                </data>
-        </table>
+			<default value="" />
+		</field>
+	</table>
 
 	<table name="rsscategory">
-                <field name="rsscategoryid" type="I" size="19">
-                        <KEY/>
-        <AUTOINCREMENT/>
-                </field>
-                <field name="rsscategory" 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>
-                <opt>Type=InnoDB</opt> <index name="RssCategory_UK0">
-                        <UNIQUE/>
-                        <col>rsscategory</col>
-                </index>
-                <data>
-                </data>
-        </table>
+		<field name="rsscategoryid" type="I" size="19">
+			<key />
+			<autoincrement />
+		</field>
+		<field name="rsscategory" 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="rsscategory_rsscategory">
+			<col>rsscategory</col>
+			<unique />
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="vendor">
 		<field name="vendorid" type="I" size="19">
-			<KEY/>
-                    <NOTNULL/>
-			<DEFAULT value="0"/>
-		</field>
-		<field name="company_name" type="C" size="100"></field>
-		<field name="vendorname" type="C" size="100"></field>
-		<field name="phone" type="C" size="100"></field>
-		<field name="email" type="C" size="100"></field>
-		<field name="website" type="C" size="100"></field>
-		<field name="glacct" type="C" size="50"></field>
-		<field name="category" type="C" size="50"></field>
-		<field name="street" type="X"></field>
-		<field name="city" type="C" size="30"></field>
-		<field name="state" type="C" size="30"></field>
-		<field name="postalcode" type="C" size="100"></field>
-		<field name="country" type="C" size="100"></field>
-		<field name="description" type="X"></field>
-		
-                  
-<opt>Type=InnoDB</opt>
-		<data>
-		</data>
-	</table>
-
-
-
-	<table name="vendor" alter="true">
-	<constraint>ADD CONSTRAINT fk_Vendor FOREIGN KEY (vendorid) REFERENCES crmentity(crmid) ON DELETE CASCADE</constraint>
-		<opt>Type=InnoDB</opt>
-		<data>
-		</data>
-	</table>
-
-        <table name="vendorcontactrel" alter="true">
-
-                <constraint>ADD CONSTRAINT fk_VendorContactRel2vendorid FOREIGN KEY (vendorid) REFERENCES vendor(vendorid) ON DELETE CASCADE</constraint>
-
-                <opt>Type=InnoDB</opt>
-
-                <data>
-                </data>
-        </table>
+			<key />
+			<notnull />
+			<default value="0" />
+			<constraint>REFERENCES crmentity(crmid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="company_name" type="C" size="100" />
+		<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="50" />
+		<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="postalcode" type="C" size="100" />
+		<field name="country" type="C" size="100" />
+		<field name="description" type="X" />
+
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
+
+	<table name="vendorcontactrel">
+		<field name="vendorid" type="I" size="19">
+			<key />
+			<default value="0" />
+			<constraint>REFERENCES vendor(vendorid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="contactid" type="I" size="19">
+			<key />
+			<default value="0" />
+			<constraint>REFERENCES contactdetails(contactid) ON DELETE CASCADE</constraint>
+		</field>
+
+		<index name="vendorcontactrel_vendorid_idx">
+			<col>vendorid</col>
+		</index>
+		<index name="vendorcontactrel_contactid_idx">
+			<col>contactid</col>
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="vendorcf">
 		<field name="vendorid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
-		</field>
-		<opt>Type=InnoDB</opt>
-		<data>
-		</data>
-	</table>
-
-
-	<table name="vendorcf" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_VendorCF FOREIGN KEY (vendorid) REFERENCES vendor(vendorid)  ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
+			<key />
+			<default value="0" />
+			<constraint>REFERENCES vendor(vendorid) ON DELETE CASCADE</constraint>
+		</field>
+
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="pricebook">
 		<field name="pricebookid" type="I" size="19">
-			<KEY/>
-                    <NOTNULL/>
-			<DEFAULT value="0"/>
-		</field>
-		<field name="bookname" type="C" size="100"></field>
-		<field name="active" type="I" size="1"></field>
-		<field name="description" type="X"></field>
-		
-                  
-	<opt>Type=InnoDB</opt>
-		<data>
-		</data>
-	</table>
-	<table name="pricebook" alter="true">
-	<constraint>ADD CONSTRAINT fk_PriceBook FOREIGN KEY (pricebookid) REFERENCES crmentity(crmid) ON DELETE CASCADE</constraint>
-		<opt>Type=InnoDB</opt>
-		<data>
-		</data>
+			<key />
+			<notnull />
+			<default value="0" />
+			<constraint>REFERENCES crmentity(crmid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="bookname" type="C" size="100" />
+		<field name="active" type="I" size="1" />
+		<field name="description" type="X" />
+
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="pricebookcf">
 		<field name="pricebookid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
-		</field>
-		<opt>Type=InnoDB</opt>
-		<data>
-		</data>
-	</table>
-
-
-	<table name="pricebookcf" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_PriceBookCF FOREIGN KEY (pricebookid) REFERENCES pricebook(pricebookid)  ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
+			<key />
+			<default value="0" />
+			<constraint>REFERENCES pricebook(pricebookid) ON DELETE CASCADE</constraint>
+		</field>
+
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="pricebookproductrel">
 		<field name="pricebookid" type="I" size="19">
-			<KEY/>
+			<key />
+			<constraint>REFERENCES pricebook(pricebookid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="productid" type="I" size="19">
-			<KEY/>
-		</field>
-		<field name="listprice" type="N" size="11.3"></field>
-		<opt>Type=InnoDB</opt> <index name="PriceBookProductRel_IDX0">
+			<key />
+			<constraint>REFERENCES products(productid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="listprice" type="N" size="11.3" />
+
+		<index name="pricebookproductrel_pricebookid_idx">
 			<col>pricebookid</col>
 		</index>
-		<opt>Type=InnoDB</opt> <index name="PriceBookProductRel_IDX1">
+		<index name="pricebookproductrel_productid_idx">
 			<col>productid</col>
 		</index>
-		<data>
-		</data>
-	</table>
-
-
-	<table name="pricebookproductrel" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_PriceBookProductRel FOREIGN KEY (pricebookid) REFERENCES pricebook(pricebookid) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
-	<table name="pricebookproductrel" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_PriceBookProductRel2 FOREIGN KEY (productid) REFERENCES products(productid) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-	
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
+
 	<table name="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>
-                <field name="mail_id" type="C" size="50">
-                </field>
-                <field name="account_name" type="C" size="50">
-                </field>
-                <field name="mail_protocol" type="C" size="20">
-                </field>
-                <field name="mail_username" type="C" size="50">
-                        <NOTNULL/>
-                </field>
-                <field name="mail_password" type="C" size="20">
-                        <NOTNULL/>
-                </field>
-                <field name="mail_servername" type="C" size="50">
-                </field>
-                <field name="status" type="C" size="10">
-                </field>
-                <field name="set_default" type="I" size="2">
-                </field>
-                <data>
-                </data>
-        </table>
+		<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="20">
+			<notnull />
+		</field>
+		<field name="mail_servername" type="C" size="50" />
+		<field name="status" type="C" size="10" />
+		<field name="set_default" type="I" size="2" />
+	</table>
 
 	<table name="quotes">
 		<field name="quoteid" type="I" size="19">
-			<KEY/>
-                    <NOTNULL/>
-			<DEFAULT value="0"/>
-		</field>
-		<field name="subject" type="C" size="100"></field>
-		<field name="potentialid" type="I" size="19"></field>
-		<field name="quotestage" type="C" size="200"></field>
-		<field name="validtill" type="D"></field>
-		<field name="team" type="C" size="200"></field>
-		<field name="contactid" type="I" size="19"></field>
-		<field name="currency" type="C" size="100"></field>
-		<field name="subtotal" type="N" size="11.3"></field>
-		<field name="carrier" type="C" size='100'></field>
-		<field name="shipping" type="C" size="100"></field>
-		<field name="inventorymanager" type="I" size="19"></field>
-		<field name="type" type="C" size="100"></field>
-		<field name="tax" type="N" size="11.3"></field>
-		<field name="adjustment" type="N" size="11.3"></field>
-		<field name="total" type="N" size="11.3"></field>
-		<field name="accountid" type="I" size="19"></field>
-		<field name="terms_conditions" type="X"></field>
-		<index name="quote_quotestage">
+			<key />
+			<notnull />
+			<default value="0" />
+			<constraint>REFERENCES crmentity(crmid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="subject" type="C" size="100" />
+		<field name="potentialid" type="I" size="19">
+			<constraint>REFERENCES potential(potentialid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="quotestage" type="C" size="200" />
+		<field name="validtill" type="D" />
+		<field name="team" type="C" size="200" />
+		<field name="contactid" type="I" size="19" />
+		<field name="currency" type="C" size="100" />
+		<field name="subtotal" type="N" size="11.3" />
+		<field name="carrier" type="C" size='100' />
+		<field name="shipping" type="C" size="100" />
+		<field name="inventorymanager" type="I" size="19" />
+		<field name="type" type="C" size="100" />
+		<field name="tax" type="N" size="11.3" />
+		<field name="adjustment" type="N" size="11.3" />
+		<field name="total" type="N" size="11.3" />
+		<field name="accountid" type="I" size="19" />
+		<field name="terms_conditions" type="X" />
+
+		<index name="quote_quotestage_idx">
 			<col>quotestage</col>
 		</index>
-		<index name="quotes_potentialid">
+		<index name="quotes_potentialid_idx">
 			<col>potentialid</col>
 		</index>
-		<index name="contactid">
+		<index name="quotes_contactid_idx">
 			<col>contactid</col>
 		</index>
-
-<opt>Type=InnoDB</opt>
-		<data>
-		</data>
-	</table>
-
-
-
-	<table name="quotes" alter="true">
-	<constraint>ADD CONSTRAINT fk_Quotes1 FOREIGN KEY (quoteid) REFERENCES crmentity(crmid) ON DELETE CASCADE</constraint>
-		<opt>Type=InnoDB</opt>
-		<data>
-		</data>
-	</table>
-
-	<table name="quotes" alter="true">
-	<constraint>ADD CONSTRAINT fk_Quotes2 FOREIGN KEY (potentialid) REFERENCES potential(potentialid) ON DELETE CASCADE</constraint>
-		<opt>Type=InnoDB</opt>
-		<data>
-		</data>
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="quotesbillads">
 		<field name="quotebilladdressid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
-		</field>
-		<field name="bill_city" type="C" size="30"></field>
-		<field name="bill_code" type="C" size="30"></field>
-		<field name="bill_country" type="C" size="30"></field>
-		<field name="bill_state" type="C" size="30"></field>
-		<field name="bill_street" type="C" size="250"></field>
-		<opt>Type=InnoDB</opt> 
-		<data>
-		</data>
-	</table>
-
-
-	<table name="quotesbillads" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_QuotesBillAds FOREIGN KEY (quotebilladdressid) REFERENCES quotes(quoteid) ON DELETE CASCADE</constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
+			<key />
+			<default value="0" />
+			<constraint>REFERENCES quotes(quoteid) ON DELETE CASCADE</constraint>
+		</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" />
+
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="quotesshipads">
 		<field name="quoteshipaddressid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
-		</field>
-		<field name="ship_city" type="C" size="30"></field>
-		<field name="ship_code" type="C" size="30"></field>
-		<field name="ship_country" type="C" size="30"></field>
-		<field name="ship_state" type="C" size="30"></field>
-		<field name="ship_street" type="C" size="250"></field>
-		<opt>Type=InnoDB</opt> 
-		<data>
-		</data>
-	</table>
-
-	<table name="quotesshipads" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_QuotesShipAds FOREIGN KEY (quoteshipaddressid) REFERENCES quotes(quoteid)  ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
+			<key />
+			<default value="0" />
+			<constraint>REFERENCES quotes(quoteid) ON DELETE CASCADE</constraint>
+		</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" />
+
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="quotescf">
 		<field name="quoteid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
-		</field>
-		<opt>Type=InnoDB</opt>
-		<data>
-		</data>
-	</table>
-
-
-	<table name="quotescf" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_QuotesCF FOREIGN KEY (quoteid) REFERENCES quotes(quoteid)  ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
+			<key />
+			<default value="0" />
+			<constraint>REFERENCES quotes(quoteid) ON DELETE CASCADE</constraint>
+		</field>
+
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="quotesproductrel">
 		<field name="quoteid" type="I" size="19">
-			<KEY/>
+			<key />
+			<constraint>REFERENCES quotes(quoteid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="productid" type="I" size="19">
-			<KEY/>
-		</field>
-		<field name="quantity" type="I" size="19"></field>
-                <field name="listprice" type="N" size="11.3"></field>
-		<opt>Type=InnoDB</opt> <index name="QuotesProductRel_IDX0">
+			<key />
+			<constraint>REFERENCES products(productid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="quantity" type="I" size="19" />
+		<field name="listprice" type="N" size="11.3" />
+
+		<index name="quotesproductrel_quoteid_idx">
 			<col>quoteid</col>
 		</index>
-		<opt>Type=InnoDB</opt> <index name="QuotesProductRel_IDX1">
+		<index name="quotesproductrel_productid_idx">
 			<col>productid</col>
 		</index>
-		<data>
-		</data>
-	</table>
-
-
-	<table name="quotesproductrel" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_QuotesProductRel FOREIGN KEY (quoteid) REFERENCES quotes(quoteid) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
-	<table name="quotesproductrel" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_QuotesProductRel2 FOREIGN KEY (productid) REFERENCES products(productid) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="purchaseorder">
 		<field name="purchaseorderid" type="I" size="19">
-			<KEY/>
-                    <NOTNULL/>
-			<DEFAULT value="0"/>
-		</field>
-		<field name="subject" type="C" size="100"></field>
-		<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>
-		<field name="tracking_no" type="C" size="100"></field>
-		<field name="contactid" type="I" size="19"></field>
-		<field name="duedate" type="D"></field>
-		<field name="carrier" type="C" size='100'></field>
-		<field name="type" type="C" size="100"></field>
-		<field name="salestax" type="N" size="11.3"></field>
-		<field name="adjustment" type="N" size="11.3"></field>
-		<field name="salescommission" type="N" size="11.3"></field>
-		<field name="exciseduty" type="N" size="11.3"></field>
-		<field name="total" type="N" size="11.3"></field>
-		<field name="subtotal" type="N" size="11.3"></field>
-		<field name="terms_conditions" type="X"></field>
-		<field name="postatus" type="C" size="200"></field>
-		<index name="PO_Vend_IDX">
+			<key />
+			<notnull />
+			<default value="0" />
+			<constraint>REFERENCES crmentity(crmid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="subject" type="C" size="100" />
+		<field name="quoteid" type="I" size="19">
+			<constraint>REFERENCES quotes(quoteid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="vendorid" type="I" size="19">
+			<constraint>REFERENCES vendor(vendorid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="requisition_no" type="C" size="100" />
+		<field name="tracking_no" type="C" size="100" />
+		<field name="contactid" type="I" size="19">
+			<constraint>REFERENCES contactdetails(contactid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="duedate" type="D" />
+		<field name="carrier" type="C" size='100' />
+		<field name="type" type="C" size="100" />
+		<field name="salestax" type="N" size="11.3" />
+		<field name="adjustment" type="N" size="11.3" />
+		<field name="salescommission" type="N" size="11.3" />
+		<field name="exciseduty" type="N" size="11.3" />
+		<field name="total" type="N" size="11.3" />
+		<field name="subtotal" type="N" size="11.3" />
+		<field name="terms_conditions" type="X" />
+		<field name="postatus" type="C" size="200" />
+
+		<index name="purchaseorder_vendorid_idx">
 			<col>vendorid</col>
 		</index>
-		<index name="PO_Quote_IDX">
+		<index name="purchaseorder_quoteid_idx">
 			<col>quoteid</col>
 		</index>
-		<index name="PO_Contact_IDX">
+		<index name="purchaseorder_contactid_idx">
 			<col>contactid</col>
 		</index>
-                  
-<opt>Type=InnoDB</opt>
-		<data>
-		</data>
-	</table>
-
-
-
-	<table name="purchaseorder" alter="true">
-	<constraint>ADD CONSTRAINT fk_PO1 FOREIGN KEY (purchaseorderid) REFERENCES crmentity(crmid) ON DELETE CASCADE</constraint>
-		<opt>Type=InnoDB</opt>
-		<data>
-		</data>
-	</table>
-
-	<table name="purchaseorder" alter="true">
-	<constraint>ADD CONSTRAINT fk_PO2 FOREIGN KEY (vendorid) REFERENCES vendor(vendorid) ON DELETE CASCADE</constraint>
-		<opt>Type=InnoDB</opt>
-		<data>
-		</data>
-	</table>
-
-	<table name="purchaseorder" alter="true">
-	<constraint>ADD CONSTRAINT fk_PO3 FOREIGN KEY (quoteid) REFERENCES quotes(quoteid) ON DELETE CASCADE</constraint>
-		<opt>Type=InnoDB</opt>
-		<data>
-		</data>
-	</table>
-
-	<table name="purchaseorder" alter="true">
-	<constraint>ADD CONSTRAINT fk_PO4 FOREIGN KEY (contactid) REFERENCES contactdetails(contactid) ON DELETE CASCADE</constraint>
-		<opt>Type=InnoDB</opt>
-		<data>
-		</data>
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="pobillads">
 		<field name="pobilladdressid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
-		</field>
-		<field name="bill_city" type="C" size="30"></field>
-		<field name="bill_code" type="C" size="30"></field>
-		<field name="bill_country" type="C" size="30"></field>
-		<field name="bill_state" type="C" size="30"></field>
-		<field name="bill_street" type="C" size="250"></field>
-		<opt>Type=InnoDB</opt> 
-		<data>
-		</data>
-	</table>
-
-
-	<table name="pobillads" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_PoBillAds FOREIGN KEY (pobilladdressid) REFERENCES purchaseorder(purchaseorderid) ON DELETE CASCADE</constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
+			<key />
+			<default value="0" />
+			<constraint>REFERENCES purchaseorder(purchaseorderid) ON DELETE CASCADE</constraint>
+		</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" />
+
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="poshipads">
 		<field name="poshipaddressid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
-		</field>
-		<field name="ship_city" type="C" size="30"></field>
-		<field name="ship_code" type="C" size="30"></field>
-		<field name="ship_country" type="C" size="30"></field>
-		<field name="ship_state" type="C" size="30"></field>
-		<field name="ship_street" type="C" size="250"></field>
-		<opt>Type=InnoDB</opt> 
-		<data>
-		</data>
-	</table>
-
-	<table name="poshipads" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_PoShipAds FOREIGN KEY (poshipaddressid) REFERENCES purchaseorder(purchaseorderid)  ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
+			<key />
+			<default value="0" />
+			<constraint>REFERENCES purchaseorder(purchaseorderid) ON DELETE CASCADE</constraint>
+		</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" />
+
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="purchaseordercf">
 		<field name="purchaseorderid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
-		</field>
-		<opt>Type=InnoDB</opt>
-		<data>
-		</data>
-	</table>
-
-
-	<table name="purchaseordercf" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_PoCF FOREIGN KEY (purchaseorderid) REFERENCES purchaseorder(purchaseorderid)  ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
+			<key />
+			<default value="0" />
+			<constraint>REFERENCES purchaseorder(purchaseorderid) ON DELETE CASCADE</constraint>
+		</field>
+
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="poproductrel">
 		<field name="purchaseorderid" type="I" size="19">
-			<KEY/>
+			<key />
+			<constraint>REFERENCES purchaseorder(purchaseorderid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="productid" type="I" size="19">
-			<KEY/>
-		</field>
-		<field name="quantity" type="I" size="19"></field>
-		<field name="listprice" type="N" size="11.3"></field>
-		<opt>Type=InnoDB</opt> <index name="PoProductRel_IDX0">
+			<key />
+			<constraint>REFERENCES products(productid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="quantity" type="I" size="19" />
+		<field name="listprice" type="N" size="11.3" />
+
+		<index name="poproductrel_quoteid_idx">
 			<col>quoteid</col>
 		</index>
-		<opt>Type=InnoDB</opt> <index name="PoProductRel_IDX1">
+		<index name="poproductrel_productid_idx">
 			<col>productid</col>
 		</index>
-		<data>
-		</data>
-	</table>
-
-
-	<table name="poproductrel" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_PoProductRel FOREIGN KEY (purchaseorderid) REFERENCES purchaseorder(purchaseorderid) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
-	<table name="poproductrel" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_PoProductRel2 FOREIGN KEY (productid) REFERENCES products(productid) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="salesorder">
 		<field name="salesorderid" type="I" size="19">
-			<KEY/>
-                    <NOTNULL/>
-			<DEFAULT value="0"/>
-		</field>
-		<field name="subject" type="C" size="100"></field>
-		<field name="potentialid" type="I" size="19"></field>
-		<field name="customerno" type="C" size="100"></field>
-		<field name="quoteid" type="I" size="19"></field>
-		<field name="vendorterms" type="C" size="100"></field>
-		<field name="contactid" type="I" size="19"></field>
-		<field name="vendorid" type="I" size="19"></field>
-		<field name="duedate" type="D"></field>
-		<field name="carrier" type="C" size='100'></field>
-		<field name="pending" type="C" size='200'></field>
-		<field name="type" type="C" size="100"></field>
-		<field name="salestax" type="N" size="11.3"></field>
-		<field name="adjustment" type="N" size="11.3"></field>
-		<field name="salescommission" type="N" size="11.3"></field>
-		<field name="exciseduty" type="N" size="11.3"></field>
-		<field name="total" type="N" size="11.3"></field>
-		<field name="subtotal" type="N" size="11.3"></field>
-		<field name="accountid" type="I" size="19"></field>
-		<field name="terms_conditions" type="X"></field>
-		<field name="purchaseorder" type="C" size='200'></field>
-		<field name="sostatus" type="C" size='200'></field>
-		<index name="SoVend_IDX">
+			<key />
+			<notnull />
+			<default value="0" />
+			<constraint>REFERENCES crmentity(crmid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="subject" type="C" size="100" />
+		<field name="potentialid" type="I" size="19" />
+		<field name="customerno" 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">
+			<constraint>REFERENCES contactdetails(contactid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="vendorid" type="I" size="19">
+			<constraint>REFERENCES vendor(vendorid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="duedate" type="D" />
+		<field name="carrier" type="C" size='100' />
+		<field name="pending" type="C" size='200' />
+		<field name="type" type="C" size="100" />
+		<field name="salestax" type="N" size="11.3" />
+		<field name="adjustment" type="N" size="11.3" />
+		<field name="salescommission" type="N" size="11.3" />
+		<field name="exciseduty" type="N" size="11.3" />
+		<field name="total" type="N" size="11.3" />
+		<field name="subtotal" type="N" size="11.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' />
+
+		<index name="salesorder_vendorid_idx">
 			<col>vendorid</col>
 		</index>
-		<index name="SoContact_IDX">
+		<index name="salesorder_contactid_idx">
 			<col>contactid</col>
 		</index>
-                  
-<opt>Type=InnoDB</opt>
-		<data>
-		</data>
-	</table>
-
-
-
-	<table name="salesorder" alter="true">
-	<constraint>ADD CONSTRAINT fk_SO1 FOREIGN KEY (salesorderid) REFERENCES crmentity(crmid) ON DELETE CASCADE</constraint>
-		<opt>Type=InnoDB</opt>
-		<data>
-		</data>
-	</table>
-
-	<table name="salesorder" alter="true">
-	<constraint>ADD CONSTRAINT fk_SO2 FOREIGN KEY (vendorid) REFERENCES vendor(vendorid) ON DELETE CASCADE</constraint>
-		<opt>Type=InnoDB</opt>
-		<data>
-		</data>
-	</table>
-
-	<table name="salesorder" alter="true">
-	<constraint>ADD CONSTRAINT fk_SO4 FOREIGN KEY (contactid) REFERENCES contactdetails(contactid) ON DELETE CASCADE</constraint>
-		<opt>Type=InnoDB</opt>
-		<data>
-		</data>
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="sobillads">
 		<field name="sobilladdressid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
-		</field>
-		<field name="bill_city" type="C" size="30"></field>
-		<field name="bill_code" type="C" size="30"></field>
-		<field name="bill_country" type="C" size="30"></field>
-		<field name="bill_state" type="C" size="30"></field>
-		<field name="bill_street" type="C" size="250"></field>
-		<opt>Type=InnoDB</opt> 
-		<data>
-		</data>
-	</table>
-
-
-	<table name="sobillads" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_SoBillAds FOREIGN KEY (sobilladdressid) REFERENCES salesorder(salesorderid) ON DELETE CASCADE</constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
+			<key />
+			<default value="0" />
+			<constraint>REFERENCES salesorder(salesorderid) ON DELETE CASCADE</constraint>
+		</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" />
+
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="soshipads">
 		<field name="soshipaddressid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
-		</field>
-		<field name="ship_city" type="C" size="30"></field>
-		<field name="ship_code" type="C" size="30"></field>
-		<field name="ship_country" type="C" size="30"></field>
-		<field name="ship_state" type="C" size="30"></field>
-		<field name="ship_street" type="C" size="250"></field>
-		<opt>Type=InnoDB</opt> 
-		<data>
-		</data>
-	</table>
-
-	<table name="soshipads" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_SoShipAds FOREIGN KEY (soshipaddressid) REFERENCES salesorder(salesorderid)  ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
+			<key />
+			<default value="0" />
+			<constraint>REFERENCES salesorder(salesorderid) ON DELETE CASCADE</constraint>
+		</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" />
+
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="salesordercf">
 		<field name="salesorderid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
-		</field>
-		<opt>Type=InnoDB</opt>
-		<data>
-		</data>
-	</table>
-
-
-	<table name="salesordercf" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_SoCF FOREIGN KEY (salesorderid) REFERENCES salesorder(salesorderid)  ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
+			<key />
+			<default value="0" />
+			<constraint>REFERENCES salesorder(salesorderid) ON DELETE CASCADE</constraint>
+		</field>
+
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="soproductrel">
 		<field name="salesorderid" type="I" size="19">
-			<KEY/>
+			<key />
+			<constraint>REFERENCES salesorder(salesorderid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="productid" type="I" size="19">
-			<KEY/>
-		</field>
-		<field name="quantity" type="I" size="19"></field>
-		<field name="listprice" type="N" size="11.3"></field>
-		<opt>Type=InnoDB</opt> <index name="SoProductRel_IDX0">
+			<key />
+			<constraint>REFERENCES products(productid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="quantity" type="I" size="19" />
+		<field name="listprice" type="N" size="11.3" />
+
+		<index name="soproductrel_salesorderid_idx">
 			<col>salesorderid</col>
 		</index>
-		<opt>Type=InnoDB</opt> <index name="SoProductRel_IDX1">
+		<index name="soproductrel_productid_idx">
 			<col>productid</col>
 		</index>
-		<data>
-		</data>
-	</table>
-
-
-	<table name="soproductrel" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_SoProductRel FOREIGN KEY (salesorderid) REFERENCES salesorder(salesorderid) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
-	<table name="soproductrel" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_SoProductRel2 FOREIGN KEY (productid) REFERENCES products(productid) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="invoice">
 		<field name="invoiceid" type="I" size="19">
-			<KEY/>
-                    <NOTNULL/>
-			<DEFAULT value="0"/>
-		</field>
-		<field name="subject" type="C" size="100"></field>
-		<field name="salesorderid" type="I" size="19"></field>
-		<field name="customerno" type="C" size="100"></field>
-		<field name="notes" type="C" size="100"></field>
-		<field name="invoicedate" type="D"></field>
-		<field name="duedate" type="D"></field>
-		<field name="invoiceterms" type="C" size="100"></field>
-		<field name="type" type="C" size="100"></field>
-		<field name="salestax" type="N" size="11.3"></field>
-		<field name="adjustment" type="N" size="11.3"></field>
-		<field name="salescommission" type="N" size="11.3"></field>
-		<field name="exciseduty" type="N" size="11.3"></field>
-		<field name="subtotal" type="N" size="11.3"></field>
-		<field name="total" type="N" size="11.3"></field>
-		<field name="shipping" type="C" size="100"></field>
-		<field name="accountid" type="I" size="19"></field>
-		<field name="terms_conditions" type="X"></field>
-		<field name="purchaseorder" type="C" size='200'></field>
-		<field name="invoicestatus" type="C" size='200'></field>
-		<index name="SoPo_IDX">
+			<key />
+			<notnull />
+			<default value="0" />
+			<constraint>REFERENCES crmentity(crmid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="subject" type="C" size="100" />
+		<field name="salesorderid" type="I" size="19" />
+		<field name="customerno" type="C" size="100" />
+		<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="salestax" type="N" size="11.3" />
+		<field name="adjustment" type="N" size="11.3" />
+		<field name="salescommission" type="N" size="11.3" />
+		<field name="exciseduty" type="N" size="11.3" />
+		<field name="subtotal" type="N" size="11.3" />
+		<field name="total" type="N" size="11.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' />
+
+		<index name="invoice_purchaseorderid_idx">
 			<col>purchaseorderid</col>
 		</index>
-		
-                  
-<opt>Type=InnoDB</opt>
-		<data>
-		</data>
-	</table>
-
-
-
-	<table name="invoice" alter="true">
-	<constraint>ADD CONSTRAINT fk_Invoice1 FOREIGN KEY (invoiceid) REFERENCES crmentity(crmid) ON DELETE CASCADE</constraint>
-		<opt>Type=InnoDB</opt>
-		<data>
-		</data>
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="invoicebillads">
 		<field name="invoicebilladdressid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
-		</field>
-		<field name="bill_city" type="C" size="30"></field>
-		<field name="bill_code" type="C" size="30"></field>
-		<field name="bill_country" type="C" size="30"></field>
-		<field name="bill_state" type="C" size="30"></field>
-		<field name="bill_street" type="C" size="250"></field>
-		<opt>Type=InnoDB</opt> 
-		<data>
-		</data>
-	</table>
-
-
-	<table name="invoicebillads" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_InvoiceBillAds FOREIGN KEY (invoicebilladdressid) REFERENCES invoice(invoiceid) ON DELETE CASCADE</constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
+			<key />
+			<default value="0" />
+			<constraint>REFERENCES invoice(invoiceid) ON DELETE CASCADE</constraint>
+		</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" />
+
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="invoiceshipads">
 		<field name="invoiceshipaddressid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
-		</field>
-		<field name="ship_city" type="C" size="30"></field>
-		<field name="ship_code" type="C" size="30"></field>
-		<field name="ship_country" type="C" size="30"></field>
-		<field name="ship_state" type="C" size="30"></field>
-		<field name="ship_street" type="C" size="250"></field>
-		<opt>Type=InnoDB</opt> 
-		<data>
-		</data>
-	</table>
-
-	<table name="invoiceshipads" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_InvoiceShipAds FOREIGN KEY (invoiceshipaddressid) REFERENCES invoice(invoiceid)  ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
+			<key />
+			<default value="0" />
+			<constraint>REFERENCES invoice(invoiceid) ON DELETE CASCADE</constraint>
+		</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" />
+
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="invoicecf">
 		<field name="invoiceid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
-		</field>
-		<opt>Type=InnoDB</opt>
-		<data>
-		</data>
-	</table>
-
-
-	<table name="invoicecf" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_InvoiceCF FOREIGN KEY (invoiceid) REFERENCES invoice(invoiceid)  ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
+			<key />
+			<default value="0" />
+			<constraint>REFERENCES invoice(invoiceid) ON DELETE CASCADE</constraint>
+		</field>
+
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="invoiceproductrel">
 		<field name="invoiceid" type="I" size="19">
-			<KEY/>
+			<key />
+			<constraint>REFERENCES invoice(invoiceid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="productid" type="I" size="19">
-			<KEY/>
-		</field>
-		<field name="quantity" type="I" size="19"></field>
-		<field name="listprice" type="N" size="11.3"></field>
-		<opt>Type=InnoDB</opt> <index name="InvoiceProductRel_IDX0">
+			<key />
+			<constraint>REFERENCES products(productid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="quantity" type="I" size="19" />
+		<field name="listprice" type="N" size="11.3" />
+
+		<index name="invoiceproductrel_invoice_idx">
 			<col>invoice</col>
 		</index>
-		<opt>Type=InnoDB</opt> <index name="InvoiceProductRel_IDX1">
+		<index name="invoiceproductrel_productid_idx">
 			<col>productid</col>
 		</index>
-		<data>
-		</data>
-	</table>
-
-
-	<table name="invoiceproductrel" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_InvoiceProductRel FOREIGN KEY (invoiceid) REFERENCES invoice(invoiceid) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
-	<table name="invoiceproductrel" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_InvoiceProductRel2 FOREIGN KEY (productid) REFERENCES products(productid) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-		
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
+
 	<table name="activity_reminder">
-                <field name="activity_id" type="I" size="11">
-                        <NOTNULL/>
-                </field>
-                <field name="reminder_time" type="I" size="11">
-                        <NOTNULL/>
-                </field>
-                <field name="reminder_sent" type="I" size="2">
-                        <NOTNULL/>
+		<field name="activity_id" type="I" size="11">
+			<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">
-			<NOTNULL/>
-		</field>
-                <data>
-                </data>
-        </table>
+			<notnull />
+		</field>
+	</table>
 
 	<table name="customview">
-                <field name="cvid" type="I" size="19">
-			<KEY/>
-                </field>
-                <field name="viewname" type="C" size="100">
-                        <NOTNULL/>
-                </field>
+		<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>
+			<default value="0" />
+		</field>
 		<field name="setmetrics" type="I" size="1">
-                        <DEFAULT value="0"/>
-                </field>
-                <field name="entitytype" type="C" size="100">
-                        <NOTNULL/>
-                </field>
-		<opt>Type=InnoDB</opt>
-                <data>
-                </data>
-        </table>
-
+			<default value="0" />
+		</field>
+		<field name="entitytype" type="C" size="100">
+			<notnull />
+		</field>
+
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="cvcolumnlist">
 		<field name="cvid" type="I" size="19">
-			<NOTNULL/>
+			<notnull />
+			<constraint>REFERENCES customview (cvid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="columnindex" type="I" size="11">
-		     <NOTNULL/>
+			<notnull />
 		</field>
 		<field name="columnname" type="C" size="250">
-		      <DEFAULT value=""/>
-		</field>
-		<index name="columnindex">
+			<default value="" />
+		</field>
+
+		<index name="cvcolumnlist_columnindex_idx">
 			<col>columnindex</col>
 		</index>
-		<index name="cvcolumnlistIDXcvid">
+		<index name="cvcolumnlist_cvid_idx">
 			<col>cvid</col>
 		</index>
-		<opt>Type=InnoDB</opt>
-		<data></data>
-	</table>
-
-	<table name="cvcolumnlist" alter="true">
-		<constraint>ADD CONSTRAINT cvcolumnlist_FK1 FOREIGN KEY (cvid) REFERENCES customview (cvid) ON DELETE CASCADE</constraint>
-		<opt>Type=InnoDB</opt>
-		<data></data>
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="cvstdfilter">
 		<field name="cvid" type="I" size="19">
+			<constraint>REFERENCES customview (cvid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="columnname" type="C" size="250">
-			<DEFAULT value=""/>
+			<default value="" />
 		</field>
 		<field name="stdfilter" type="C" size="250">
-			<DEFAULT value=""/>
+			<default value="" />
 		</field>
 		<field name="startdate" type="D">
-			<DEFAULT value="NULL"/>
+			<default value="NULL" />
 		</field>
 		<field name="enddate" type="D">
-			<DEFAULT value="NULL"/>
-		</field>
-		<index name="cvstdfilter_IDX0">
+			<default value="NULL" />
+		</field>
+
+		<index name="cvstdfilter_cvid_idx">
 			<col>cvid</col>
 		</index>
-		<opt>Type=InnoDB</opt>
-		<data></data>
-	</table>
-
-	<table name="cvstdfilter" alter="true">
-		<constraint>ADD CONSTRAINT cvstdfilter_FK1 FOREIGN KEY (cvid) REFERENCES customview (cvid) ON DELETE CASCADE</constraint>
-		<opt>Type=InnoDB</opt>
-		<data></data>
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="cvadvfilter">
 		<field name="cvid" type="I" size="19">
+			<constraint>REFERENCES customview (cvid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="columnindex" type="I" size="11">
-			<NOTNULL/>
+			<notnull />
 		</field>
 		<field name="columnname" type="C" size="250">
-			<DEFAULT value=""/>
+			<default value="" />
 		</field>
 		<field name="comparator" type="C" size="10">
-			<DEFAULT value=""/>
+			<default value="" />
 		</field>
 		<field name="value" type="C" size="200">
-			<DEFAULT value=""/>
-		</field>
-		<index name="cvadvfilter_IDX0">
+			<default value="" />
+		</field>
+
+		<index name="cvadvfilter_cvid_idx">
 			<col>cvid</col>
 		</index>
-		<opt>Type=InnoDB</opt>
-		<data></data>
-	</table>
-
-	<table name="cvadvfilter" alter="true">
-		<constraint>ADD CONSTRAINT cvadvfilter_FK1 FOREIGN KEY (cvid) REFERENCES customview (cvid) ON DELETE CASCADE</constraint>
-		<opt>Type=InnoDB</opt>
-		<data></data>
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="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_IDX0">
-                        <col>cvid</col>
-                </index>
-                <opt>Type=InnoDB</opt>
-                <data></data>
-        </table>
-
-        <table name="customaction" alter="true">
-                <constraint>ADD CONSTRAINT customaction_FK1 FOREIGN KEY (cvid) REFERENCES customview (cvid) ON DELETE CASCADE</constraint>
-                <opt>Type=InnoDB</opt>
-                <data></data>
-        </table>
-	
+		<field name="cvid" type="I" size="19">
+			<notnull />
+			<constraint>REFERENCES customview (cvid) ON DELETE CASCADE</constraint>
+		</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">Type=InnoDB</opt>
+	</table>
+
 	<table name="selectquery">
-                <field name="queryid" type="I" size="19">
-			<KEY />
-			<NOTNULL/>
-                </field>
-                <field name="startindex" type="I" size="19">
-                        <DEFAULT value="0"/>
-                </field>
+		<field name="queryid" type="I" size="19">
+			<key />
+			<notnull />
+		</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_IDX0">
-                        <col>queryid</col>
-                </index>
-                <opt>Type=InnoDB</opt>
-                <data>
-                </data>
-        </table>
+			<default value="0" />
+		</field>
+
+		<index name="selectquery_queryid_idx">
+			<col>queryid</col>
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="selectcolumn">
 		<field name="queryid" type="I" size="19">
-			<NOTNULL/>
+			<notnull />
+			<constraint>REFERENCES selectquery (queryid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="columnindex" type="I" size="11">
-		     <NOTNULL/>
-		     <DEFAULT value="0"/>
+			<notnull />
+			<default value="0" />
 		</field>
 		<field name="columnname" type="C" size="250">
-		      <DEFAULT value=""/>
-		</field>
-                <index name="selectcolumn_IDX0">
-                        <col>queryid</col>
-                </index>
-		<opt>Type=InnoDB</opt>
-		<data></data>
-	</table>
-
-	<table name="selectcolumn" alter="true">
-		<constraint>ADD CONSTRAINT selectcolumn_FK1 FOREIGN KEY (queryid) REFERENCES selectquery (queryid) ON DELETE CASCADE</constraint>
-		<opt>Type=InnoDB</opt>
-		<data></data>
+			<default value="" />
+		</field>
+
+		<index name="selectcolumn_queryid_idx">
+			<col>queryid</col>
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="relcriteria">
 		<field name="queryid" type="I" size="19">
-			<NOTNULL/>
+			<notnull />
+			<constraint>REFERENCES selectquery (queryid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="columnindex" type="I" size="11">
-			<NOTNULL/>
+			<notnull />
 		</field>
 		<field name="columnname" type="C" size="250">
-			<DEFAULT value=""/>
+			<default value="" />
 		</field>
 		<field name="comparator" type="C" size="10">
-			<DEFAULT value=""/>
+			<default value="" />
 		</field>
 		<field name="value" type="C" size="200">
-			<DEFAULT value=""/>
-		</field>
-                <index name="relcriteria_IDX0">
-                        <col>queryid</col>
-                </index>
-		<opt>Type=InnoDB</opt>
-		<data></data>
-	</table>
-
-	<table name="relcriteria" alter="true">
-		<constraint>ADD CONSTRAINT relcriteria_FK1 FOREIGN KEY (queryid) REFERENCES selectquery (queryid) ON DELETE CASCADE</constraint>
-		<opt>Type=InnoDB</opt>
-		<data></data>
+			<default value="" />
+		</field>
+
+		<index name="relcriteria_queryid_idx">
+			<col>queryid</col>
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="reportfolder">
 		<field name="folderid" type="I" size="19">
-			<KEY/>
-			<AUTOINCREMENT/>
+			<key />
+			<autoincrement />
 		</field>
 		<field name="foldername" type="C" size="100">
-			<NOTNULL/>
-			<DEFAULT value=""/>
+			<notnull />
+			<default value="" />
 		</field>
 		<field name="description" type="C" size="250">
-			<DEFAULT value=""/>
+			<default value="" />
 		</field>
 		<field name="state" type="C" size="50">
-			<DEFAULT value="SAVED"/>
-		</field>
-		<opt>Type=InnoDB</opt>
-		<data></data>
+			<default value="SAVED" />
+		</field>
+
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="report">
 		<field name="reportid" type="I" size="19">
-			<KEY/>
+			<key />
 		</field>
 		<field name="folderid" type="I" size="19">
-			<NOTNULL/>
+			<notnull />
+			<constraint>REFERENCES reportfolder (folderid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="reportname" type="C" size="100">
-			<DEFAULT value=""/>
+			<default value="" />
 		</field>
 		<field name="description" type="C" size="250">
-			<DEFAULT value=""/>
+			<default value="" />
 		</field>
 		<field name="reporttype" type="C" size="50">
-			<DEFAULT value=""/>
+			<default value="" />
 		</field>
 		<field name="queryid" type="I" size="19">
-			<NOTNULL/>
-			<DEFAULT value="0"/>
+			<notnull />
+			<default value="0" />
+			<constraint>REFERENCES selectquery (queryid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="state" type="C" size="50">
-			<DEFAULT value="SAVED"/>
+			<default value="SAVED" />
 		</field>
 		<field name="customizable" type="I" size="1">
-			<DEFAULT value="1"/>
+			<default value="1" />
 		</field>
 		<field name="category" type="I" size="11">
-			<DEFAULT value="1"/>
-		</field>
-		<index name="report_IDX0">
+			<default value="1" />
+		</field>
+
+		<index name="report_queryid_idx">
 			<col>queryid</col>
 		</index>
-		<index name="report_IDX1">
+		<index name="report_folderid_idx">
 			<col>folderid</col>
 		</index>
-		<opt>Type=InnoDB</opt>
-		<data></data>
-	</table>
-
-	<table name="report" alter="true">
-		<constraint>ADD CONSTRAINT report_FK1 FOREIGN KEY (queryid) REFERENCES selectquery (queryid) ON DELETE CASCADE</constraint>
-		<opt>Type=InnoDB</opt>
-		<data></data>
-	</table>
-	<table name="report" alter="true">
-		<constraint>ADD CONSTRAINT report_FK2 FOREIGN KEY (folderid) REFERENCES reportfolder (folderid) ON DELETE CASCADE</constraint>
-		<opt>Type=InnoDB</opt>
-		<data></data>
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="reportmodules">
 		<field name="reportmodulesid" type="I" size="19">
-			<KEY/>
+			<key />
+			<constraint>REFERENCES report (reportid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="primarymodule" type="C" size="50">
-			<NOTNULL/>
-			<DEFAULT value=""/>
+			<notnull />
+			<default value="" />
 		</field>
 		<field name="secondarymodules" type="C" size="250">
-			<DEFAULT value=""/>
-		</field>
-		<opt>Type=InnoDB</opt>
-		<data></data>
-	</table>
-	<table name="reportmodules" alter="true">
-		<constraint>ADD CONSTRAINT reportmodules_FK1 FOREIGN KEY (REPORTMODULESID) REFERENCES report (REPORTID) ON DELETE CASCADE</constraint>
-		<opt>Type=InnoDB</opt>
-		<data></data>
+			<default value="" />
+		</field>
+
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="reportsortcol">
 		<field name="sortcolid" type="I" size="19">
-			<NOTNULL/>
-			<DEFAULT value="0"/>
+			<notnull />
+			<default value="0" />
 		</field>
 		<field name="reportid" type="I" size="19">
-			<NOTNULL/>
-			<DEFAULT value="0"/>
+			<notnull />
+			<default value="0" />
+			<constraint>REFERENCES report (reportid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="columnname" type="C" size="250">
-			<DEFAULT value=""/>
+			<default value="" />
 		</field>
 		<field name="sortorder" type="C" size="250">
-			<DEFAULT value="Asc"/>
-		</field>
-		<index name="reportsortcol_IDX0">
+			<default value="Asc" />
+		</field>
+
+		<index name="reportsortcol_reportid_idx">
 			<col>reportid</col>
 		</index>
-		<opt>Type=InnoDB</opt>
-		<data></data>
-	</table>
-	<table name="reportsortcol" alter="true">
-		<constraint>ADD CONSTRAINT reportsortcol_FK1 FOREIGN KEY (REPORTID) REFERENCES report (REPORTID) ON DELETE CASCADE</constraint>
-		<opt>Type=InnoDB</opt>
-		<data></data>
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="reportdatefilter">
 		<field name="datefilterid" type="I" size="19">
-			<NOTNULL/>
-			<DEFAULT value="0"/>
+			<notnull />
+			<default value="0" />
+			<constraint>REFERENCES report (reportid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="datecolumnname" type="C" size="250">
-			<DEFAULT value=""/>
+			<default value="" />
 		</field>
 		<field name="datefilter" type="C" size="250">
-			<DEFAULT value=""/>
+			<default value="" />
 		</field>
 		<field name="startdate" type="D">
-			<DEFAULT value="NULL"/>
+			<default value="NULL" />
 		</field>
 		<field name="enddate" type="D">
-			<DEFAULT value="NULL"/>
-		</field>
+			<default value="NULL" />
+		</field>
+
 		<index name="reportdatefilter_IDX0">
 			<col>datefilterid</col>
 		</index>
-		<opt>Type=InnoDB</opt>
-		<data></data>
-	</table>
-	<table name="reportdatefilter" alter="true">
-		<constraint>ADD CONSTRAINT reportdatefilter_FK1 FOREIGN KEY (DATEFILTERID) REFERENCES report (REPORTID) ON DELETE CASCADE</constraint>
-		<opt>Type=InnoDB</opt>
-		<data></data>
-	</table>
-	
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
+
 	<table name="reportsummary">
 		<field name="reportsummaryid" type="I" size="19">
-			<NOTNULL/>
-			<DEFAULT value="0"/>
+			<notnull />
+			<default value="0" />
+			<constraint>REFERENCES report (reportid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="summarytype" type="I" size="19">
-			<NOTNULL/>
-			<DEFAULT value="0"/>
+			<notnull />
+			<default value="0" />
 		</field>
 		<field name="columnname" type="C" size="250">
-			<DEFAULT value=""/>
-		</field>
-		<index name="reportsummary_IDX0">
+			<default value="" />
+		</field>
+
+		<index name="reportsummary_reportsummaryid_idx">
 			<col>reportsummaryid</col>
 		</index>
-		<opt>Type=InnoDB</opt>
-		<data></data>
-	</table>
-	<table name="reportsummary" alter="true">
-		<constraint>ADD CONSTRAINT reportsummary_FK1 FOREIGN KEY (REPORTSUMMARYID) REFERENCES report (REPORTID) ON DELETE CASCADE</constraint>
-		<opt>Type=InnoDB</opt>
-		<data></data>
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="usageunit">
 		<field name="usageunitid" type="I" size="19">
-			<KEY/>
-	<AUTOINCREMENT/>
-		
+			<key />
+			<autoincrement />
 		</field>
 		<field name="usageunit" 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>
-		<opt>Type=InnoDB</opt> <index name="UsageUnit_UK0">
-			<UNIQUE/>
+			<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="usageunit_usageunit_idx">
 			<col>usageunit</col>
-		</index>
-		<data>
-		</data>
+			<unique />
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="glacct">
 		<field name="glacctid" type="I" size="19">
-			<KEY/>
-	<AUTOINCREMENT/>
-		
+			<key />
+			<autoincrement />
 		</field>
 		<field name="glacct" 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>
-		<opt>Type=InnoDB</opt> <index name="GlAcct_UK0">
-			<UNIQUE/>
+			<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="glacct_glacct_idx">
 			<col>glacct</col>
-		</index>
-		<data>
-		</data>
+			<unique />
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="quotestage">
 		<field name="quotestageid" type="I" size="19">
-			<KEY/>
-	<AUTOINCREMENT/>
-		
+			<key />
+			<autoincrement />
 		</field>
 		<field name="quotestage" 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>
-		<opt>Type=InnoDB</opt> <index name="quotestage_UK0">
-			<UNIQUE/>
+			<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="quotestage_quotestage_idx">
 			<col>quotestage</col>
-		</index>
-		<data>
-		</data>
+			<unique />
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="invoicestatus">
 		<field name="inovicestatusid" type="I" size="19">
-			<KEY/>
-	<AUTOINCREMENT/>
-		
+			<key />
+			<autoincrement />
 		</field>
 		<field name="invoicestatus" 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>
-		<opt>Type=InnoDB</opt> <index name="invoicestatus_UK0">
-			<UNIQUE/>
+			<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="invoicestatus_invoiestatus_idx">
 			<col>invoicestatus</col>
-		</index>
-		<data>
-		</data>
+			<unique />
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="postatus">
 		<field name="postatusid" type="I" size="19">
-			<KEY/>
-	<AUTOINCREMENT/>
-		
+			<key />
+			<autoincrement />
 		</field>
 		<field name="postatus" 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>
-		<opt>Type=InnoDB</opt> <index name="postatus_UK0">
-			<UNIQUE/>
+			<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="postatus_postatus_idx">
 			<col>postatus</col>
-		</index>
-		<data>
-		</data>
+			<unique />
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="sostatus">
 		<field name="sostatusid" type="I" size="19">
-			<KEY/>
-	<AUTOINCREMENT/>
-		
+			<key />
+			<autoincrement />
 		</field>
 		<field name="sostatus" 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>
-		<opt>Type=InnoDB</opt> <index name="sostatus_UK0">
-			<UNIQUE/>
+			<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="sostatus_sostatus_idx">
 			<col>sostatus</col>
-		</index>
-		<data>
-		</data>
+			<unique />
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="carrier">
 		<field name="carrierid" type="I" size="19">
-			<KEY/>
-	<AUTOINCREMENT/>
-		
+			<key />
+			<autoincrement />
 		</field>
 		<field name="carrier" 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>
-		<opt>Type=InnoDB</opt> <index name="carrier_UK0">
-			<UNIQUE/>
+			<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="carrier_carrier_idx">
 			<col>carrier</col>
-		</index>
-		<data>
-		</data>
+			<unique />
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="taxclass">
 		<field name="taxclassid" type="I" size="19">
-			<KEY/>
-	<AUTOINCREMENT/>
-		
+			<key />
+			<autoincrement />
 		</field>
 		<field name="taxclass" 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>
-		<opt>Type=InnoDB</opt> <index name="carrier_UK0">
-			<UNIQUE/>
+			<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="taxclass_carrier_idx">
 			<col>carrier</col>
-		</index>
-		<data>
-		</data>
+			<unique />
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="organizationdetails">
-		<field name="organizationame" type="C" size="60"></field>
-		<field name="address" type="C" size="150"></field>
-		<field name="city" type="C" size="100"></field>
-		<field name="state" type="C" size="100"></field>
-		<field name="country" type="C" size="100"></field>
-		<field name="code" type="C" size="30"></field>
-		<field name="phone" type="C" size="30"></field>
-		<field name="fax" type="C" size="30"></field>
-		<field name="website" type="C" size="50"></field>
-		<field name="logoname" type="C" size="50"></field>
-		<field name="logo" type="X"></field>
-		<opt>Type=InnoDB</opt>
-		<data>
-		</data>
+		<field name="organizationame" type="C" size="60" />
+		<field name="address" type="C" size="150" />
+		<field name="city" type="C" size="100" />
+		<field name="state" type="C" size="100" />
+		<field name="country" type="C" size="100" />
+		<field name="code" type="C" size="30" />
+		<field name="phone" type="C" size="30" />
+		<field name="fax" type="C" size="30" />
+		<field name="website" type="C" size="50" />
+		<field name="logoname" type="C" size="50" />
+		<field name="logo" type="X" />
+
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="recurringtype">
 		<field name="recurringeventid" type="I" size="19">
-			<KEY/>
-			<AUTOINCREMENT/>
-
+			<key />
+			<autoincrement />
 		</field>
 		<field name="recurringtype" 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>
-		<opt>Type=InnoDB</opt> <index name="RecurringEvent_UK0">
-			<UNIQUE/>
+			<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="recurringtype_status_idx">
 			<col>status</col>
-		</index>
-		<data>
-
-		</data>
+			<unique />
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="recurringevents">
 		<field name="recurringid" type="I" size="19">
-			<KEY/>
-			<AUTOINCREMENT/>
+			<key />
+			<autoincrement />
 		</field>
 		<field name="activityid" type="I" size="19">
-			<NOTNULL/>
-		</field>
-		<field name="recurringdate" type="D"></field>
-		<field name="recurringtype" type="C" size="30"></field>
-		<opt>Type=InnoDB</opt>
-		<data>
-		</data>
-	</table>
-	
+			<notnull />
+		</field>
+		<field name="recurringdate" type="D" />
+		<field name="recurringtype" type="C" size="30" />
+
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
+
 	<table name="inventorynotification">
-                <field name="notificationid" type="I" size="19">
-                        <KEY/>
-                        <AUTOINCREMENT/>
-                </field>
-                <field name="notificationname" type="C" size="200">
-                </field>
-                <field name="notificationsubject" type="C" size="200">
-                </field>
-                <field name="notificationbody" type="X" >
-                </field>
-                <field name="label" type="C" size="50">
-                </field>
-                <opt>Type=InnoDB</opt>
-                <data>
-                </data>
+		<field name="notificationid" type="I" size="19">
+			<key />
+			<autoincrement />
+		</field>
+		<field name="notificationname" type="C" size="200" />
+		<field name="notificationsubject" type="C" size="200" />
+		<field name="notificationbody" type="X" />
+		<field name="label" type="C" size="50" />
+
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="convertleadmapping">
 		<field name="cfmid" type="I" size="19">
-			<KEY/>
-			<AUTOINCREMENT/>
+			<key />
+			<autoincrement />
 		</field>
 		<field name="leadfid" type="I" size="19">
-			<NOTNULL/>
-		</field>
-		<field name="accountfid" type="I" size="19"></field>
-		<field name="contactfid" type="I" size="19"></field>
-		<field name="potentialfid" type="I" size="19"></field>
-		<opt>Type=InnoDB</opt>
-		<data>
-		</data>
-	</table>
-
-
+			<notnull />
+		</field>
+		<field name="accountfid" type="I" size="19" />
+		<field name="contactfid" type="I" size="19" />
+		<field name="potentialfid" type="I" size="19" />
+
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 </schema>





More information about the vtigercrm-commits mailing list