[Vtigercrm-commits] [vtiger-commits] r5758 - /vtigercrm/trunk/schema/DatabaseSchema.xml

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Fri May 5 18:17:19 EDT 2006


Author: allanbush
Date: Fri May  5 16:17:14 2006
New Revision: 5758

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

Modified:
    vtigercrm/trunk/schema/DatabaseSchema.xml

Modified: vtigercrm/trunk/schema/DatabaseSchema.xml
==============================================================================
--- vtigercrm/trunk/schema/DatabaseSchema.xml (original)
+++ vtigercrm/trunk/schema/DatabaseSchema.xml Fri May  5 16:17:14 2006
@@ -3,7804 +3,5041 @@
 
 	<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>
+			<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="cal_color" type="C" size="25">
-			<DEFAULT value="#E6FAD8"/>
-		</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>
+			<default value="#E6FAD8" />
+		</field>
+		<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"/>
+			<default value="0" />
 		</field>
 		<field name="currency_id" type="I" size="19">
-			<DEFAULT value="1"/>
-                        <NOTNULL/>
-                </field>
-		<field name="description" type="X"></field>
+			<default value="1" />
+			<notnull />
+		</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="homeorder" type="C" size="255">
-			<DEFAULT value="ALVT,PLVT,QLTQ,CVLVT,HLT,OLV,GRT,OLTSO,ILTI,MNL"/>
+			<default value="ALVT,PLVT,QLTQ,CVLVT,HLT,OLV,GRT,OLTSO,ILTI,MNL" />
 		</field>
 		<field name="activity_view" type="C" size="25">
-			<DEFAULT value="Today"/>
+			<default value="Today" />
 		</field>
 		<field name="lead_view" type="C" size="25">
-			<DEFAULT value="Today"/>
-		</field>
-		<field name="tagcloud" type="C" size="250" ></field>
-		<field name="imagename" type="C" size="250">
-	        </field>
+			<default value="Today" />
+		</field>
+		<field name="tagcloud" type="C" size="250" />
+		<field name="imagename" type="C" size="250" />
 		<field name="deleted" type="I" size="1">
-			<NOTNULL/>
-			<DEFAULT value="0"/>
-		</field>
-		<field name="defhomeview" type="C" size="100"> </field>
-	<opt>Type=InnoDB</opt>
-		<index name="idx_user_name">
+			<notnull />
+			<default value="0" />
+		</field>
+		<field name="defhomeview" type="C" size="100" />
+
+		<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"/>
+			<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">
+			<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="sharedcalendar">
 		<field name="userid" type="I" size="19">
-			<KEY/>
+			<key />
 		</field>
 		<field name="sharedid" type="I" size="19">
-			<KEY/>
-		</field>
-	</table>
-
+			<key />
+		</field>
+	</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="tabid1">
+		<index name="tab_tabid_idx">
 			<col>tabid</col>
 		</index>
-		<data>
-
-		</data>
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="blocks">
-                <field name="blockid" type="I" size="19">
-                        <KEY/>
-                        <NOTNULL/>
-                </field>
-                <field name="tabid" type="I" size="19">
-                        <NOTNULL/>
-                </field>
-                <field name="blocklabel" type="C" size="100">
-                        <NOTNULL/>
-                </field>
-                <field name="sequence" type="I" size="10"></field>
-                <field name="show_title" type="I" size="2"></field>
-                <field name="visible" type="I" size="2">
-                        <NOTNULL/>
-                        <DEFAULT value="0"/>
-                </field>
-                <field name="create_view" type="I" size="2">
-                        <NOTNULL/>
-                        <DEFAULT value="0"/>
-                </field>
-                <field name="edit_view" type="I" size="2">
-                        <NOTNULL/>
-                        <DEFAULT value="0"/>
-                </field>
-                <field name="detail_view" type="I" size="2">
-                        <NOTNULL/>
-                        <DEFAULT value="0"/>
-                </field>
-                <index name="block_tabid">
-                        <col>tabid</col>
-                </index>
-                <data>
-
-                </data>
-        </table>
-
-
-              <table name="field">
+		<field name="blockid" type="I" size="19">
+			<key />
+			<notnull />
+		</field>
 		<field name="tabid" type="I" size="19">
-        			<NOTNULL/>
-			</field>
+			<notnull />
+		</field>
+		<field name="blocklabel" type="C" size="100">
+			<notnull />
+		</field>
+		<field name="sequence" type="I" size="10" />
+		<field name="show_title" type="I" size="2" />
+		<field name="visible" type="I" size="2">
+			<notnull />
+			<default value="0" />
+		</field>
+		<field name="create_view" type="I" size="2">
+			<notnull />
+			<default value="0" />
+		</field>
+		<field name="edit_view" type="I" size="2">
+			<notnull />
+			<default value="0" />
+		</field>
+		<field name="detail_view" type="I" size="2">
+			<notnull />
+			<default value="0" />
+		</field>
+
+		<index name="block_tabid_idx">
+			<col>tabid</col>
+		</index>
+	</table>
+
+	<table name="field">
+		<field name="tabid" type="I" size="19">
+			<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>
-	
+			<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" />
+		<field name="typeofdata" type="C" size="100" />
 		<field name="quickcreate" type="I" size="10">
-			<NOTNULL/>
-			<DEFAULT value="1"/>
-		</field>
-		
-		<field name="quickcreatesequence" type="I" size="19">
-		</field>
-		
-		<field name="info_type" type="C" size="20">
-		</field>
-	         
-		 <index name="Field_IDX0">
+			<notnull />
+			<default value="1" />
+		</field>
+		<field name="quickcreatesequence" type="I" size="19" />
+		<field name="info_type" type="C" size="20" />
+
+		<index name="field_tabid_idx">
 			<col>tabid</col>
 		</index>
-		<index name="fieldname">
+		<index name="field_fieldname_idx">
 			<col>fieldname</col>
 		</index>
-		<index name="tabid2">
-			<col>tabid</col>
-		</index>
-		<index name="blockid">
+		<index name="field_block_idx">
 			<col>block</col>
 		</index>
-		<index name="displaytypeid">
+		<index name="field_displaytype_idx">
 			<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="100"></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="100" />
+		<field name="fax" type="C" size="30" />
 		<field name="employees" type="I" size="10">
-			<DEFAULT value="0"/>
+			<default value="0" />
 		</field>
 		<field name="emailoptout" type="C" size="3">
-                        <DEFAULT value="0"/>
+			<default value="0" />
 		</field>
 		<field name="notify_owner" type="C" size="3">
-			<DEFAULT value="0"/>
-		</field>
-
-		<index name="account_type">
-                        <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>
-
-
-
+			<default value="0" />
+		</field>
+
+		<index name="account_account_type_idx">
+			<col>account_type</col>
+		</index>
+		<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>
-		<field name="pobox" type="C" size="30"></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" />
+		<field name="pobox" type="C" size="30" />
+
+		<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="pobox" 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="pobox" 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>
-		<field name="campaignid" 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="campaignid" 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>
-		<field name="imagename" type="C" size="150"></field>
-		<field name="reference" type="C" size="3"></field>
+			<default value="Dollars" />
+		</field>
+		<field name="imagename" type="C" size="150" />
+		<field name="reference" type="C" size="3" />
 		<field name="notify_owner" type="C" size="3">
-			<DEFAULT value="0"/>
-		</field>
-             
-		 <index name="ContactDetails_IDX1">
+			<default value="0"/>
+		</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="mailingpobox" 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>
-		<field name="otherpobox" type="C" size="30"></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="mailingpobox" 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" />
+		<field name="otherpobox" type="C" size="30" />
+
+		<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_portalinfo123 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_customerdetails567 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="campaignid" type="I" size="19"></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="campaignid" type="I" size="19" />
+		<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="pobox" 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="pobox" 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" size="10.2">
-			<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="potentialid1">
+		<index name="potential_potentialid_idx">
 			<col>potentialid</col>
 		</index>
-		<index name="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="3.2"></field>
-		<field name="expectedrevenue" type="N"></field>
-		<field name="closedate" type="D"></field>
-		<field name="lastmodified" type="T">
-                        <NOTNULL/>
-                </field>
-		<opt>Type=InnoDB</opt>
-	       	
-	       	<index name="potstagehistory_IDX1">
-			<col>historyid</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>
-
-
+			<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" />
+
+		<index name="potstagehistory_potentialid_idx">
+			<col>potentialid</col>
+		</index>
+		<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="date_start" type="D">      
-			<NOTNULL/>
-                        </field>                        
-		<field name="due_date" type="D">      
-                        </field>                        
-
-
+			<notnull />
+		</field>
+
+		<field name="date_start" type="D">
+			<notnull />
+		</field>
+		<field name="due_date" type="D" />
 		<field name="time_start" type="C" size="50">
-			<NOTNULL/>
-		</field>
-
+			<notnull />
+		</field>
 		<field name="sendnotification" type="C" size="3">
-			<NOTNULL/>
-			<DEFAULT value="0"/>
-		</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>     
-
-        	<field name="notime" type="C" size="3">
-			<NOTNULL/>
-			<DEFAULT value="0"/>
+			<notnull />
+			<default value="0"/>
+		</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" />
+		<field name="notime" type="C" size="3">
+			<notnull />
+			<default value="0" />
 		</field>
 		<field name="visibility" type="C" size="50">
-			<NOTNULL/>
-		</field>
-			<opt>Type=InnoDB</opt>
-		 <index name="Activity_IDX0">
+			<notnull />
+		</field>
+
+		<index name="activity_activityid_subject_idx">
 			<col>activityid</col>
 			<col>subject</col>
 		</index>
-		<index name="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="eventstatus">
+		<index name="activity_eventstatus_idx">
 			<col>eventstatus</col>
 		</index>
-		<index name="status1">
+		<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>
-		<opt>Type=InnoDB</opt>
-		<index name="attachmentsid1">
+			<notnull />
+		</field>
+		<field name="description" type="C" size="100" />
+		<field name="type" type="C" size="100" />
+		<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="attachmentsid2">
+			<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="vendor">
 		<field name="vendorid" type="I" size="19">
-			<KEY/>
-                    <NOTNULL/>
-			<DEFAULT value="0"/>
-		</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="pobox" 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>
-
-
-
-
-
-
-
-
-
-
-
+			<key />
+			<notnull />
+			<default value="0" />
+			<constraint>REFERENCES crmentity(crmid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="vendorname" type="C" size="100" />
+		<field name="phone" type="C" size="100" />
+		<field name="email" type="C" size="100" />
+		<field name="website" type="C" size="100" />
+		<field name="glacct" type="C" size="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="pobox" type="C" size="30" />
+		<field name="postalcode" type="C" size="100" />
+		<field name="country" type="C" size="100" />
+		<field name="description" type="X" />
+
+		<opt platform="mysql">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="3.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="X"></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="X" />
+
+		<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/>
+			<notnull />
 		</field>
 		<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>
-		<opt>Type=InnoDB</opt> <index name="Currency_CRY">
-			<UNIQUE/>
+			<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="visibility">
 		<field name="visibilityid" type="I" size="19">
-			<KEY/>
-			<AUTOINCREMENT/>
-
+			<key />
+			<autoincrement />
 		</field>
 		<field name="visibility" type="C" size="200">
-			<NOTNULL/>
+			<notnull />
 		</field>
 		<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>
-		<opt>Type=InnoDB</opt> <index name="Visibility_VLY">
-			<UNIQUE/>
+			<notnull />
+			<default value="1"/>
+		</field>
+
+		<index name="visibility_visibility_idx">
 			<col>visibility</col>
-		</index>
-		<data>
-		</data>
+			<unique />
+		</index>
+		<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/>
+			<notnull />
 		</field>
 		<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>
-		<opt>Type=InnoDB</opt> <index name="Manufacturer_MFR">
-			<UNIQUE/>
+			<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="C" size="255">
-                        <KEY/>
-                </field>
-                <field name="rolename" type="C" size="200">
-                </field>
-                <field name="parentrole" type="C" size="255">
-                </field>
-                <field name="depth" type="I" size="19">
-                </field>
-                <opt>Type=InnoDB</opt>
-                <data>
-                </data>
-        </table>
+		<field name="roleid" type="C" size="255">
+			<key />
+		</field>
+		<field name="rolename" type="C" size="200" />
+		<field name="parentrole" type="C" size="255" />
+		<field name="depth" type="I" size="19" />
+
+		<opt platform="mysql">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="C" size="255">
-			<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="groupid" type="I" size="19">
-			<KEY/>
-		</field>
-		<field name="groupname" type="C" size="100">
-		</field>
-		<field name="description" type="X"></field>
-		
-		<opt>Type=InnoDB</opt>
-	
-	<index name="idx_groups_123group">
+			<key />
+		</field>
+		<field name="groupname" type="C" size="100" />
+		<field name="description" type="X" />
+
+		<index name="groups_groupname_idx">
 			<col>groupname</col>
-			</index>
-		<data>
-		</data>
-	</table>
-
-
+			<unique />
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="users2group">
 		<field name="groupid" type="I" size="19">
-			<KEY/>
+			<key />
+			<constraint>REFERENCES groups(groupid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="userid" type="I" size="19">
-			<KEY/>
-		</field>
-		<index name="idx_users2group">
+			<key />
+			<constraint>REFERENCES users(id) ON DELETE CASCADE</constraint>
+		</field>
+
+		<index name="users2group_groupname_uerid_idx">
 			<col>groupid</col>
 			<col>userid</col>
 		</index>
-		<data>
-		</data>
-	</table>
-
-	<table name="users2group" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_users2group1 FOREIGN KEY (groupid) REFERENCES groups(groupid) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-	<table name="users2group" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_users2group2 FOREIGN KEY (userid) REFERENCES users(id) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
+	</table>
 
 	<table name="group2grouprel">
 		<field name="groupid" type="I" size="19">
-			<KEY/>
+			<key />
+			<constraint>REFERENCES groups(groupid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="containsgroupid" type="I" size="19">
-			<KEY/>
-		</field>
-		<data>
-		</data>
-	</table>
-
-	<table name="group2grouprel" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_group2grouprel1 FOREIGN KEY (groupid) REFERENCES groups(groupid) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-	<table name="group2grouprel" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_group2grouprel2 FOREIGN KEY (containsgroupid) REFERENCES groups(groupid) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
+			<key />
+			<constraint>REFERENCES groups(groupid) ON DELETE CASCADE</constraint>
+		</field>
+
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="group2role">
 		<field name="groupid" type="I" size="19">
-			<KEY/>
+			<key />
+			<constraint>REFERENCES groups(groupid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="roleid" type="C" size="255">
-			<KEY/>
-		</field>
-		<data>
-		</data>
-	</table>
-
-	<table name="group2role" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_group2role1 FOREIGN KEY (groupid) REFERENCES groups(groupid) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-	<table name="group2role" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_group2role2 FOREIGN KEY (roleid) REFERENCES role(roleid) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
+			<key />
+			<constraint>REFERENCES role(roleid) ON DELETE CASCADE</constraint>
+		</field>
 	</table>
 
 	<table name="group2rs">
 		<field name="groupid" type="I" size="19">
-			<KEY/>
+			<key />
+			<constraint>REFERENCES groups(groupid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="roleandsubid" type="C" size="255">
-			<KEY/>
-		</field>
-		<data>
-		</data>
-	</table>
-
-	<table name="group2rs" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_group2rs1 FOREIGN KEY (groupid) REFERENCES groups(groupid) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-	<table name="group2rs" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_group2rs2 FOREIGN KEY (roleandsubid) REFERENCES role(roleid) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
-
+			<key />
+			<constraint>REFERENCES role(roleid) ON DELETE CASCADE</constraint>
+		</field>
+	</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="campaign">
-                <field name="campaignname" type="C" size="255">
-                </field>
-		<field name="campaigntype" type="C" size="255">
-                </field>
-		<field name="campaignstatus" type="C" size="255">
-                </field>
-		<field name="expectedrevenue" type="I" size="19">
-                </field>
-    		<field name="budgetcost" type="I" size="19">
-                </field>
- 		<field name="actualcost" type="I" size="19">
-                </field>
- 		<field name="expectedresponse" type="C" size="255">
-                </field>
- 		<field name="numsent" type="N" size="11.0">
-                </field>
- 		<field name="product_id" type="I" size="19">
-                </field>
- 		<field name="sponsor" type="C" size="255">
-                </field>
- 		<field name="targetaudience" type="C" size="255">
-                </field>
- 		<field name="targetsize" type="I" size="19">
-		</field>
-	<field name="expectedresponsecount" type="I" size="19">
-	</field>
-	<field name="expectedsalescount" type="I" size="19">
-	</field>
-	<field name="expectedroi" type="I" size="19">
-	</field>
-	<field name="actualresponsecount" type="I" size="19">
-	</field>
-	<field name="actualsalescount" type="I" size="19">
-	</field>
-	<field name="actualroi" type="I" size="19">
-	</field>
-
- 		<field name="campaignid" type="I" size="19">
-		<KEY/>
-                </field>
- 		<field name="closingdate" type="D">
-		</field>
-
-
-		<opt>Type=InnoDB</opt>
-		<index name="idx_campaignstatus">
-                        <col>campaignstatus</col>
-                </index>
-		<index name="idx_campaignname">
-                        <col>campaignname</col>
-                </index>
-	<index name="idx_campaignid">
-                        <col>campaignid</col>
-                </index>	
-        </table>
+		<field name="campaignname" type="C" size="255" />
+		<field name="campaigntype" type="C" size="255" />
+		<field name="campaignstatus" type="C" size="255" />
+		<field name="expectedrevenue" type="I" size="19" />
+		<field name="budgetcost" type="I" size="19" />
+		<field name="actualcost" type="I" size="19" />
+		<field name="expectedresponse" type="C" size="255" />
+		<field name="numsent" type="N" size="11.0" />
+		<field name="product_id" type="I" size="19" />
+		<field name="sponsor" type="C" size="255" />
+		<field name="targetaudience" type="C" size="255" />
+		<field name="targetsize" type="I" size="19" />
+		<field name="expectedresponsecount" type="I" size="19" />
+		<field name="expectedsalescount" type="I" size="19" />
+		<field name="expectedroi" type="I" size="19" />
+		<field name="actualresponsecount" type="I" size="19" />
+		<field name="actualsalescount" type="I" size="19" />
+		<field name="actualroi" type="I" size="19" />
+		<field name="campaignid" type="I" size="19">
+			<key />
+		</field>
+		<field name="closingdate" type="D" />
+
+		<index name="campaign_campaignstatus_idx">
+			<col>campaignstatus</col>
+		</index>
+		<index name="campaign_campaignname_idx">
+			<col>campaignname</col>
+		</index>
+		<index name="campaign_campaignid_idx">
+			<col>campaignid</col>
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="campaignscf">
 		<field name="campaignid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
-		</field>
-		<opt>Type=InnoDB</opt>
-		<data>
-		</data>
-	</table>
-
-
-	<table name="campaignscf" alter="true">
-
-		<constraint>ADD CONSTRAINT fk_CampaignsCF FOREIGN KEY (campaignid) REFERENCES campaign(campaignid)  ON DELETE CASCADE </constraint>
-
-		<opt>Type=InnoDB</opt>
-
-		<data>
-		</data>
+			<key />
+			<default value="0" />
+			<constraint>REFERENCES campaign(campaignid) ON DELETE CASCADE</constraint>
+		</field>
+
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="campaigncontrel">
-                <field name="campaignid" type="I" size="19">
-                         <KEY/>
-                        <DEFAULT value="0"/>
-                </field>
-                <field name="contactid" type="I" size="19">
-                        <NOTNULL/>
-                        <DEFAULT value="0"/>
-                </field>
-                                    
-	        <index name="CampaignContRel_IDX1">
-                        <col>contactid</col>
-                </index>
-                <opt>Type=InnoDB</opt>
-                <data> 
-                </data>
-        </table>
-	
- 
-
-	<table name="campaigncontrel" alter="true"> 
-		<constraint>ADD CONSTRAINT fk_CampaignContRel1 FOREIGN KEY (campaignid) REFERENCES campaign(campaignid)  ON DELETE CASCADE</constraint>
-                <opt>Type=InnoDB</opt>
-
-                <data>
-                </data>
-        </table>
-
-       <table name="campaigncontrel" alter="true">
-
-                <constraint>ADD CONSTRAINT fk_CampaignContRel2 FOREIGN KEY (contactid) REFERENCES contactdetails(contactid)  ON DELETE CASCADE</constraint>
-
-                <opt>Type=InnoDB</opt>
-
-                <data>
-                </data>
-        </table>
-
+		<field name="campaignid" type="I" size="19">
+			<key />
+			<default value="0"/>
+			<constraint>REFERENCES campaign(campaignid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="contactid" type="I" size="19">
+			<notnull />
+			<default value="0"/>
+			<constraint>REFERENCES contactdetails(contactid) ON DELETE CASCADE</constraint>
+		</field>
+
+		<index name="campaigncontrel_contractid_idx">
+			<col>contactid</col>
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="campaignleadrel">
-                <field name="campaignid" type="I" size="19">
-                        <KEY/>
-                        <DEFAULT value="0"/>
-                </field>
-                <field name="leadid" type="I" size="19">
-                        <NOTNULL/>
-                        <DEFAULT value="0"/>
-                </field>
-
-                <index name="CampaignLeadRel_IDX1">
-                        <col>leadid</col>
-	<col>campaignid</col>
-                </index>
-                <opt>Type=InnoDB</opt>
-                <data>
-                </data>
-        </table>
-
-	<table name="campaignleadrel" alter="true">
-
-                <constraint>ADD CONSTRAINT fk_CampaignLeadRel2423 FOREIGN KEY (leadid) REFERENCES leaddetails(leadid)  ON DELETE CASCADE</constraint>
-
-                <opt>Type=InnoDB</opt>
-
-                <data>
-                </data>
-        </table>
-
-
-        <table name="campaignleadrel" alter="true">
-
-                <constraint>ADD CONSTRAINT fk_CampaignLeadRel1234 FOREIGN KEY (campaignid) REFERENCES campaign(campaignid) ON DELETE CASCADE</constraint>
-
-                <opt>Type=InnoDB</opt>
-
-                <data>
-                </data>
-        </table>
-
-
+		<field name="campaignid" type="I" size="19">
+			<key />
+			<default value="0" />
+			<constraint>REFERENCES campaign(campaignid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="leadid" type="I" size="19">
+			<notnull />
+			<default value="0" />
+			<constraint>REFERENCES leaddetails(leadid) ON DELETE CASCADE</constraint>
+		</field>
+
+		<index name="campaignleadrel_leadid_campaignid_idx">
+			<col>leadid</col>
+			<col>campaignid</col>
+		</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" />
+			<constraint>REFERENCES contactdetails(contactid) ON DELETE CASCADE</constraint>
 		</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" />
+			<constraint>REFERENCES potential(potentialid) ON DELETE CASCADE</constraint>
+		</field>
+
+		<index name="contpotentialrel_potentialid_idx">
 			<col>potentialid</col>
 		</index>
-		<opt>Type=InnoDB</opt> <index name="ContPotentialRel_IDX1">
+		<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_ContPotentialRel123 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="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="3.2">
-			<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" />
+			<constraint>REFERENCES contactdetails(contactid) ON DELETE CASCADE</constraint>
 		</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_CntActivityRelQ23 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 -->
+		<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_LAR23 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" />
+			<constraint>REFERENCES crmentity(crmid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="notesid" type="I" size="19">
-			<KEY/>
-			<DEFAULT value="0"/>
-		</field>
-		 <index name="crmentityNotesRel_IDX0">
+			<key />
+			<default value="0" />
+			<constraint>REFERENCES notes(notesid) ON DELETE CASCADE</constraint>
+		</field>
+
+		<index name="crmentitynotesrel_notesid_idx">
 			<col>notesid</col>
 		</index>
-		 <index name="crmentityNotesRel_IDX1">
+		<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_crmentityNotes23 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>
+		<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 />
+			<constraint>REFERENCES crmentity(crmid) ON DELETE CASCADE</constraint>
+		</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="filename" type="C" size="50"></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="status2">
-                                <col>status</col>
-                        </index>	
-
-		<data>
-		</data>
-	</table>
-	<table name="troubletickets" alter="true">
-
-                <constraint>ADD CONSTRAINT fk_troubleticketsCF12 FOREIGN KEY (ticketid) REFERENCES crmentity(crmid)  ON DELETE CASCADE        </constraint>
-
-                <opt>Type=InnoDB</opt>
-
-                <data>
-                </data>
-        </table>
+			<notnull />
+		</field>
+		<field name="filename" type="C" size="50" />
+		<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>
+		</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" >
-                        <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_ticketcommentsCF23 FOREIGN KEY (ticketid) REFERENCES troubletickets(ticketid)  ON DELETE CASCADE </constraint>
-
-                <opt>Type=InnoDB</opt>
-
-                <data>
-                </data>
-        </table>
+			<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_SalesmanActivityRel23 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_VendorContactRel45 FOREIGN KEY (vendorid) REFERENCES vendor(vendorid) ON DELETE CASCADE</constraint>
-
-                <opt>Type=InnoDB</opt>
-
-                <data>
-                </data>
-        </table>
-
-
-
-        <table name="vendorcontactrel" alter="true">
-
-                <constraint>ADD CONSTRAINT fk_VendorContactRel2 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="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_contact_idx">
+			<col>contactid</col>
+		</index>
+		<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_SalesmanTicketRel344 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" />
+			<constraint>REFERENCES crmentity(crmid) ON DELETE CASCADE</constraint>
 		</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_SeTicketsRel1 FOREIGN KEY (crmid) REFERENCES crmentity(crmid) ON DELETE CASCADE</constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<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">
-			<KEY/>
+			<key />
+			<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(groupname) 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_leadgrouprelation567 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(groupname) ON DELETE CASCADE</constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="accountgrouprelation">
 		<field name="accountid" type="I" size="19">
-			<KEY/>
+			<key />
+			<constraint>REFERENCES account(accountid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="groupname" type="C" size="100">
-		</field>		
-		<opt>Type=InnoDB</opt>
-
-		<index name="accountgrouprelation_IDX1">
+			<constraint>REFERENCES groups(groupname) ON DELETE CASCADE</constraint>
+		</field>
+
+		<index name="accountgrouprelation_groupname_idx">
 			<col>groupname</col>
 		</index>
-		<data>		
-		</data>
-	</table>
-
-
-	<table name="accountgrouprelation" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_accountgrouprelation123 FOREIGN KEY (accountid) REFERENCES account(accountid) ON DELETE CASCADE</constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
-
-	<table name="accountgrouprelation" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_accountgrouprelation2 FOREIGN KEY (groupname) REFERENCES groups(groupname) ON DELETE CASCADE</constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-	
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
+
 	<table name="contactgrouprelation">
 		<field name="contactid" type="I" size="19">
-			<KEY/>
+			<key />
+			<constraint>REFERENCES contactdetails(contactid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="groupname" type="C" size="100">
-		</field>		
-		<opt>Type=InnoDB</opt>
-
-		<index name="contactgrouprelation_IDX1">
+			<constraint>REFERENCES groups(groupname) ON DELETE CASCADE</constraint>
+		</field>
+
+		<index name="contactgrouprelation_groupname_idx">
 			<col>groupname</col>
 		</index>
-		<data>		
-		</data>
-	</table>
-
-	<table name="contactgrouprelation" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_contactgrouprelation123 FOREIGN KEY (contactid) REFERENCES contactdetails(contactid) ON DELETE CASCADE</constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-	<table name="contactgrouprelation" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_contactgrouprelation2 FOREIGN KEY (groupname) REFERENCES groups(groupname) ON DELETE CASCADE</constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-	
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
+
 	<table name="potentialgrouprelation">
 		<field name="potentialid" type="I" size="19">
-			<KEY/>
+			<key />
+			<constraint>REFERENCES potential(potentialid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="groupname" type="C" size="100">
-		</field>		
-		<opt>Type=InnoDB</opt>
-
-		<index name="potentialgrouprelation_IDX1">
+			<constraint>REFERENCES groups(groupname) ON DELETE CASCADE</constraint>
+		</field>
+
+		<index name="potentialgrouprelation_groupname_idx">
 			<col>groupname</col>
 		</index>
-		<data>		
-		</data>
-	</table>
-
-	<table name="potentialgrouprelation" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_potentialgrouprelation67 FOREIGN KEY (potentialid) REFERENCES potential(potentialid) ON DELETE CASCADE</constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-	<table name="potentialgrouprelation" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_potentialgrouprelation2 FOREIGN KEY (groupname) REFERENCES groups(groupname) ON DELETE CASCADE</constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-	
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="campaigngrouprelation">
 		<field name="campaignid" type="I" size="19">
-			<KEY/>
+			<key />
+			<constraint>REFERENCES campaign(campaignid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="groupname" type="C" size="100">
-		</field>
-		<opt>Type=InnoDB</opt>
+			<constraint>REFERENCES groups(groupname) ON DELETE CASCADE</constraint>
+		</field>
 
 		<index name="campaigngrouprelation_IDX1">
 			<col>groupname</col>
 		</index>
-		<data>
-		</data>
-	</table>
-
-	<table name="campaigngrouprelation" alter="true">
-
-		<constraint>ADD CONSTRAINT fk_campaigngrouprelation1 FOREIGN KEY (campaignid) REFERENCES campaign(campaignid) ON DELETE CASCADE</constraint>
-
-		<opt>Type=InnoDB</opt>
-
-		<data>
-		</data>
-	</table>
-
-	<table name="campaigngrouprelation" alter="true">
-
-		<constraint>ADD CONSTRAINT fk_campaigngrouprelation2 FOREIGN KEY (groupname) REFERENCES groups(groupname) ON DELETE CASCADE</constraint>
-
-		<opt>Type=InnoDB</opt>
-
-		<data>
-		</data>
-	</table>
-
-	
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
+
 	<table name="sogrouprelation">
 		<field name="salesorderid" type="I" size="19">
-			<KEY/>
+			<key />
+			<constraint>REFERENCES salesorder(salesorderid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="groupname" type="C" size="100">
-		</field>		
-		<opt>Type=InnoDB</opt>
-
-		<index name="sogrouprelation_IDX1">
+			<constraint>REFERENCES groups(groupname) ON DELETE CASCADE</constraint>
+		</field>
+
+		<index name="sogrouprelation_groupname_idx">
 			<col>groupname</col>
 		</index>
-		<data>		
-		</data>
-	</table>
-
-	
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
+
 	<table name="invoicegrouprelation">
 		<field name="invoiceid" type="I" size="19">
-			<KEY/>
+			<key />
+			<constraint>REFERENCES invoice(invoiceid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="groupname" type="C" size="100">
-		</field>		
-		<opt>Type=InnoDB</opt>
-
-		<index name="invoicegrouprelation_IDX1">
+			<constraint>REFERENCES groups(groupname) ON DELETE CASCADE</constraint>
+		</field>
+
+		<index name="invoicegrouprelation_groupname_invoiceid_idx">
 			<col>groupname</col>
-						<col>invoiceid</col>
-		</index>
-		<data>		
-		</data>
-	</table>
-
-
-	
+			<col>invoiceid</col>
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
+
 	<table name="pogrouprelation">
 		<field name="purchaseorderid" type="I" size="19">
-			<KEY/>
+			<key />
+			<constraint>REFERENCES purchaseorder(purchaseorderid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="groupname" type="C" size="100">
-		</field>		
-		<opt>Type=InnoDB</opt>
-
-		<index name="pogrouprelation_IDX1">
+			<constraint>REFERENCES groups(groupname) ON DELETE CASCADE</constraint>
+		</field>
+
+		<index name="pogrouprelation_groupname_purchaseorderid_idx">
 			<col>groupname</col>
 			<col>purchaseorderid</col>
 		</index>
-		<data>		
-		</data>
-	</table>
-
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="activitygrouprelation">
 		<field name="activityid" type="I" size="19">
-		<KEY/>
+			<key />
+			<constraint>REFERENCES activity(activityid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="groupname" type="C" size="100">
-		</field>		
-
-	       	<index name="activitygrouprelation_IDX0">
+			<constraint>REFERENCES groups(groupname) 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(groupname) ON DELETE CASCADE</constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-        <table name="ticketgrouprelation">
-                <field name="ticketid" type="I" size="19">
-		<KEY/>
-                </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">
+			<key />
+			<constraint>REFERENCES troubletickets(ticketid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="groupname" type="C" size="100">
+			<constraint>REFERENCES groups(groupname) 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(groupname) ON DELETE CASCADE</constraint>
-
-                <opt>Type=InnoDB</opt>
-
-                <data>
-                </data>
-        </table>
-
-
-
-
-
-	<table name="quotegrouprelation">
-		<field name="quoteid" type="I" size="19">
-			<KEY/>
-		</field>
-		<field name="groupname" type="C" size="100">
-		</field>		
-		<opt>Type=InnoDB</opt>
-
-		<index name="quotegrouprelation_IDX1">
-			<col>groupname</col>
-		</index>
-		<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>
-                <field name="smtp_auth" type="C" size="5"> </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" />
+		<field name="smtp_auth" type="C" size="5" />
+	</table>
 
 	<table name="currency_info">
-                <field name="id" type="I" >
-                        <KEY/>
-                <AUTOINCREMENT/>
-
-                </field>
-                <field name="currency_name" type="C" size="100"></field>
-                <field name="currency_code" type="C" size="100"></field>
-                <field name="currency_symbol" type="C" size="30"> </field>
-                <field name="conversion_rate" type="N" size="5.3"> </field>
-                <field name="currency_status" type="C" size="25"> </field>
+		<field name="id" type="I" >
+			<key />
+			<autoincrement />
+
+		</field>
+		<field name="currency_name" type="C" size="100" />
+		<field name="currency_code" type="C" size="100" />
+		<field name="currency_symbol" type="C" size="30" />
+		<field name="conversion_rate" type="N" size="5.3" />
+		<field name="currency_status" type="C" size="25" />
 		<field name="defaultid" type="C" size="10">
-                        <NOTNULL/>
-                        <DEFAULT value="0"/>
-                        </field>
-                <data>
-                </data>
-        </table>
-
+			<notnull />
+			<default value="0" />
+		</field>
+	</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_defaultcv12 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="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_faqCF34 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" >
-                        <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_faqcommentsCF123 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">
+			<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_SeNotesRel23 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>
-
-
-
-
-
-
-
-<table name="ticketstracktime">
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
+
+	<table name="ticketstracktime">
 		<field name="ticket_id" type="I" size="11">
-			<KEY/>
-			<NOTNULL/>
-			<DEFAULT value="0"/>
+			<key />
+			<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_HelpDeskCF23 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_ProductCF34 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/>
+			<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/>
-		</field>
-		
+			<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/>
+			<notnull />
 		</field>
 		<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>
-		<opt>Type=InnoDB</opt> <index name="AccountDepStatus_UK0">
-			<UNIQUE/>
+			<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/>
+			<notnull />
 		</field>
 		<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>
-		<opt>Type=InnoDB</opt> <index name="AccountOwnership_UK0">
-			<UNIQUE/>
+			<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/>
+			<notnull />
 		</field>
 		<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>
-		<opt>Type=InnoDB</opt> <index name="AccountRating_UK0">
-			<UNIQUE/>
+			<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/>
+			<notnull />
 		</field>
 		<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>
-		<opt>Type=InnoDB</opt> <index name="AccountRegion_UK0">
-			<UNIQUE/>
+			<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/>
+			<notnull />
 		</field>
 		<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>
-		<opt>Type=InnoDB</opt> <index name="AccountType_UK0">
-			<UNIQUE/>
+			<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/>
+			<notnull />
 		</field>
 		<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>
-		<opt>Type=InnoDB</opt> <index name="ContactType_UK0">
-			<UNIQUE/>
+			<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/>
+			<notnull />
 		</field>
 		<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>
-		<opt>Type=InnoDB</opt> <index name="LeadSource_UK0">
-			<UNIQUE/>
+			<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/>
+			<notnull />
 		</field>
 		<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>
-		<opt>Type=InnoDB</opt> <index name="LeadStage_UK0">
-			<UNIQUE/>
+			<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/>
+			<notnull />
 		</field>
 		<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>
-		<opt>Type=InnoDB</opt> <index name="LeadStatus_UK0">
-			<UNIQUE/>
+			<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/>
+			<notnull />
 		</field>
 		<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>
-		<opt>Type=InnoDB</opt> <index name="LicenceKeyStatus_UK0">
-			<UNIQUE/>
+			<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/>
+			<notnull />
 		</field>
 		<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>
-
+			<notnull />
+			<default value="1" />
+		</field>
 		<field name="probability" type="N" size="3.2">
-			<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/>
+			<notnull />
 		</field>
 		<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>
-		<opt>Type=InnoDB</opt> <index name="Priority_UK0">
-			<UNIQUE/>
+			<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/>
+			<notnull />
 		</field>
 		<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>
-		<opt>Type=InnoDB</opt> <index name="BusinessType_UK0">
-			<UNIQUE/>
+			<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/>
+			<notnull />
 		</field>
 		<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>
-		<opt>Type=InnoDB</opt> <index name="Industry_UK0">
-			<UNIQUE/>
+			<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/>
+			<notnull />
 		</field>
 		<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>
-		<opt>Type=InnoDB</opt> <index name="RevenueType_UK0">
-			<UNIQUE/>
+			<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/>
+			<notnull />
 		</field>
 		<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="taskpriority">
 		<field name="taskpriorityid" type="I" size="19">
-			<KEY/><AUTOINCREMENT/>
-
-		
-		</field>
-		<field name="taskpriority" type="C" size="100"></field>
+			<key />
+			<autoincrement />
+		</field>
+		<field name="taskpriority" 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="1"/>
-		</field>
-		<data>
-		</data>
-            
-	</table>
+			<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>
+			<key />
+			<autoincrement />
+		</field>
+		<field name="taskstatus" 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="1"/>
-		</field>
-		<data>
-		</data>
+			<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/>
+			<notnull />
 		</field>
 		<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>
-		<opt>Type=InnoDB</opt> <index name="ActivityType_UK0">
-			<UNIQUE/>
+			<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/>
+			<notnull />
 		</field>
 		<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>
-		<opt>Type=InnoDB</opt> <index name="UserType_UK0">
-			<UNIQUE/>
+			<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="profile2globalpermissions">
 		<field name="profileid" type="I" size="19">
-			<KEY/>
+			<key />
+			<constraint>REFERENCES profile(profileid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="globalactionid" type="I" size="19">
-			<KEY/>
-		</field>
-		<field name="globalactionpermission" type="I" size="19"></field>
-	<index name="idx_profile2globalpermissions">
-                        <col>profileid</col>
-                        <col>globalactionid</col>
-                        
-                </index>		
-
-<opt>Type=InnoDB</opt>
-		<data>
-		</data>
-	</table>
-
+			<key />
+		</field>
+		<field name="globalactionpermission" type="I" size="19" />
+
+		<index name="idx_profile2globalpermissions">
+			<col>profileid</col>
+			<col>globalactionid</col>
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="activsubtype">
 		<field name="activesubtypeid" type="I" size="19">
-			<KEY/>
-<AUTOINCREMENT/>
-		</field>
-		<field name="activsubtype" type="C" size="100"></field>
+			<key />
+			<autoincrement />
+		</field>
+		<field name="activsubtype" 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="1"/>
-		</field>
-		<data>
-
-		</data>
-	</table>
-
-
-
-
+			<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/>
+			<notnull />
 		</field>
 		<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>
-		<opt>Type=InnoDB</opt> <index name="DownloadPurpose_UK0">
-			<UNIQUE/>
+			<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>
+			<key />
+			<autoincrement />
+		</field>
+		<field name="hrs" type="C" size="50" />
 		<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="durationmins">
 		<field name="minsid" type="I" size="19">
-			<KEY/>
-<AUTOINCREMENT/>
-		
-		</field>
-		<field name="mins" type="C" size="50"></field>
+			<key />
+			<autoincrement />
+		</field>
+		<field name="mins" type="C" size="50" />
 		<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="evaluationstatus">
 		<field name="evalstatusid" type="I" size="19">
-			<KEY/>
-<AUTOINCREMENT/>
-			</field>
+			<key />
+			<autoincrement />
+		</field>
 		<field name="status" type="C" size="200">
-			<NOTNULL/>
+			<notnull />
 		</field>
 		<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>
-		<opt>Type=InnoDB</opt> <index name="EvaluationStatus_UK0">
-			<UNIQUE/>
+			<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>
-		<field name="description" type="X"></field>
-<opt>Type=InnoDB</opt>
-		<data>		
-		</data>
+			<notnull />
+		</field>
+		<field name="description" type="X" />
+
+		<opt platform="mysql">Type=InnoDB</opt>
 	</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="idx_profile2tab1">
-			<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">
-			<KEY/>
+			<key />
 		</field>
 		<field name="tabid" type="I" size="10">
-			<KEY/>
+			<key />
 		</field>
 		<field name="Operation" type="I" size="10">
-			<KEY/>
-		</field>
-		<field name="permissions" type="I" size="1"></field>
-		<index name="idx_prof2stad">
+			<key />
+		</field>
+		<field name="permissions" type="I" size="1" />
+
+		<index name="profile2standardpermissions_profileid_tabid_Operation_idx">
 			<col>profileid</col>
 			<col>tabid</col>
 			<col>Operation</col>
 		</index>
-		<data>
-		</data>
 	</table>
 
 	<table name="profile2field">
-			<field name="profileid" type="I" size="11">
-				<KEY/>
-			</field>
-                	<field name="tabid" type="I" size="10"></field>
-                	<field name="fieldid" type="I" size="19">
-				<KEY/>
-			</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">
+			<key />
+		</field>
+		<field name="tabid" type="I" size="10" />
+		<field name="fieldid" type="I" size="19">
+			<key />
+		</field>
+		<field name="visible" type="I" size="19" />
+		<field name="readonly" type="I" size="19" />
+
+		<index name="profile2field_profileid_tabid_fieldname_idx">
 			<col>profileid</col>
 			<col>tabid</col>
 			<col>fieldname</col>
 		</index>
-			<index name="tabid3">
+		<index name="profile2field_tabid_profileid_idx">
 			<col>tabid</col>
 			<col>profileid</col>
 		</index>
-			<index name="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="C" size="255">
-			<KEY/>
+			<key />
 		</field>
 		<field name="profileid" type="I" size="11">
-			<KEY/>
-		</field>
-			<index name="idx_role2profileid1">
+			<key />
+		</field>
+		<index name="role2profile_roleid_profileid_idx">
 			<col>roleid</col>
 			<col>profileid</col>
-		</index>	
-		<data>
-		
-		</data>
-	</table>
-
-
-
+		</index>
+	</table>
 
 	<table name="org_share_action_mapping">
 		<field name="share_action_id" type="I" size="19">
-			<KEY/>
+			<key />
 		</field>
 		<field name="share_action_name" type="C" size="200">
-			<KEY/>
-		</field>
-		<opt>Type=InnoDB</opt>
-		<data>
-		</data>
-	</table>
-
-
-
-	
+			<key />
+		</field>
+
+		<opt platform="mysql">Type=InnoDB</opt>
+	</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/>
+			<notnull />
 		</field>
 		<field name="permission" type="I" size="19">
-		</field>
-		<field name="editstatus" type="I" size="19">
-		</field>
-
-		<data>
-		
-		</data>
-	</table>
-	<table name="def_org_share" alter="true">
-		<constraint>ADD CONSTRAINT fk_def_org_share23 FOREIGN KEY (permission) REFERENCES org_share_action_mapping(share_action_id) ON DELETE CASCADE</constraint>
-		<opt>Type=InnoDB</opt>
-		<data>
-		</data>
+			<constraint>REFERENCES org_share_action_mapping(share_action_id) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="editstatus" type="I" size="19" />
 	</table>
 
 	<table name="def_org_field">
-                	<field name="tabid" type="I" size="10"></field>
-                	<field name="fieldid" type="I" size="19">
-				<KEY/>
-			</field>
-	                <field name="visible" type="I" size="19"></field>
-        	        <field name="readonly" type="I" size="19"></field>
-			<index name="idx_def_org_field">
+		<field name="tabid" type="I" size="10" />
+		<field name="fieldid" type="I" size="19">
+			<key />
+		</field>
+		<field name="visible" type="I" size="19" />
+		<field name="readonly" type="I" size="19" />
+
+		<index name="def_org_field_tabid_fieldid_idx">
 			<col>tabid</col>
 			<col>fieldid</col>
-			</index>
-			<index name="tabid4">
-				<col>tabid</col>
-			</index>
-			<index name="visible">
-				<col>visible</col>
-				<col>fieldid</col>
-			</index>	
-		<data>
-		</data>
+		</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">
-			<KEY/>
+			<key />
 		</field>
 		<field name="tabid" type="I" size="11">
-			<KEY/>
+			<key />
 		</field>
 		<field name="activityid" type="I" size="11">
-			<KEY/>
-		</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>
-
-
+			<key />
+		</field>
+		<field name="permission" type="I" size="1" />
+
+		<index name="profile2utility_profileid_tabid_activityid_idx">
+			<col>profileid</col>
+			<col>tabid</col>
+			<col>activityid</col>
+		</index>
+	</table>
 
 	<table name="productcategory">
 		<field name="productcategoryid" type="I" size="19">
-			<KEY/>
-	<AUTOINCREMENT/>
-			
+			<key />
+			<autoincrement />
 		</field>
 		<field name="productcategory" type="C" size="200">
-			<NOTNULL/>
+			<notnull />
 		</field>
 		<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>
-		<opt>Type=InnoDB</opt> <index name="ProductCategory_UK0">
-			<UNIQUE/>
+			<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="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>
-		<field name="bill_pobox" type="C" size="30"></field>
-		<opt>Type=InnoDB</opt> 
-		<data>
-		</data>
-	</table>
-
-
-	<table name="sobillads" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_SoBillAds12 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" />
+		<field name="bill_pobox" type="C" size="30" />
+
+		<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>
-		<field name="ship_pobox" type="C" size="30"></field>
-		<opt>Type=InnoDB</opt> 
-		<data>
-		</data>
-	</table>
-
-	<table name="soshipads" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_SoShipAds3 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" />
+		<field name="ship_pobox" type="C" size="30" />
+
+		<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_SoCF234 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_SoProductRel123 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>
-	</table>
-
-
-
-
-
-
-
-
-
+		<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_activityproductRel34 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="idx_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="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_VendorCF234 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_PriceBook234 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_PriceBookCF12 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_PriceBookProductRel5 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="box_refresh" type="I" size="10">
-                </field>
-                <field name="mails_per_page" type="I" size="10">
-                </field>
-                <field name="ssltype" type="C" size="50">
-                </field>
-                <field name="sslmeth" type="C" size="50">
-                </field>
-                <field name="showbody" type="C" size="10">
-                </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="box_refresh" type="I" size="10" />
+		<field name="mails_per_page" type="I" size="10" />
+		<field name="ssltype" type="C" size="50" />
+		<field name="sslmeth" type="C" size="50" />
+		<field name="showbody" type="C" size="10" />
+		<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="quotestage">
-			<col>quoteid</col>
-		</index>
-		<index name="potentialid2">
+			<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">
+			<constraint>REFERENCES contactdetails(contactid) ON DELETE CASCADE</constraint>
+		</field>
+		<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_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>
-	</table>
-
-	<table name="quotes" alter="true">
-	<constraint>ADD CONSTRAINT fk_Quotes3 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="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>
-		<field name="bill_pobox" type="C" size="30"></field>
-		<opt>Type=InnoDB</opt> 
-		<data>
-		</data>
-	</table>
-
-
-	<table name="quotesbillads" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_QuotesBillAds3 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" />
+		<field name="bill_pobox" type="C" size="30" />
+
+		<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>
-		<field name="ship_pobox" type="C" size="30"></field>
-		<opt>Type=InnoDB</opt> 
-		<data>
-		</data>
-	</table>
-
-	<table name="quotesshipads" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_QuotesShipAds35 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" />
+		<field name="ship_pobox" type="C" size="30" />
+
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
+
+	<table name="quotegrouprelation">
+		<field name="quoteid" type="I" size="19">
+			<key />
+			<constraint>REFERENCES quotes(quoteid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="groupname" type="C" size="100">
+			<constraint>REFERENCES groups(groupname) ON DELETE CASCADE</constraint>
+		</field>
+
+		<index name="quotegrouprelation_groupname_idx">
+			<col>groupname</col>
+		</index>
+		<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_QuotesCF135 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_QuotesProductRel674 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_PO2345 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_PO3 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>
-		<field name="bill_pobox" type="C" size="30"></field>
-		<opt>Type=InnoDB</opt> 
-		<data>
-		</data>
-	</table>
-
-
-	<table name="pobillads" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_PoBillAds57 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" />
+		<field name="bill_pobox" type="C" size="30" />
+
+		<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>
-		<field name="ship_pobox" type="C" size="30"></field>
-		<opt>Type=InnoDB</opt> 
-		<data>
-		</data>
-	</table>
-
-	<table name="poshipads" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_PoShipAds34 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" />
+		<field name="ship_pobox" type="C" size="30" />
+
+		<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_PoCF78 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_PoProductRel67 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>
-	</table>
-
+		<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="contactid" type="I" size="19"></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">
+			<constraint>REFERENCES salesorder(salesorderid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="customerno" type="C" size="100" />
+		<field name="contactid" type="I" size="19" />
+		<field name="notes" type="C" size="100" />
+		<field name="invoicedate" type="D" />
+		<field name="duedate" type="D" />
+		<field name="invoiceterms" type="C" size="100" />
+		<field name="type" type="C" size="100" />
+		<field name="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>invoiceid</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>
-	</table>
-
-	<table name="invoice" alter="true">
-	<constraint>ADD CONSTRAINT fk_Invoice2 FOREIGN KEY (salesorderid) REFERENCES salesorder(salesorderid) 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>
-		<field name="bill_pobox" type="C" size="30"></field>
-		<opt>Type=InnoDB</opt> 
-		<data>
-		</data>
-	</table>
-
-
-	<table name="invoicebillads" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_InvoiceBillAds47923 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" />
+		<field name="bill_pobox" type="C" size="30" />
+
+		<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>
-		<field name="ship_pobox" type="C" size="30"></field>
-		<opt>Type=InnoDB</opt> 
-		<data>
-		</data>
-	</table>
-
-	<table name="invoiceshipads" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_InvoiceShipAds8 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" />
+		<field name="ship_pobox" type="C" size="30" />
+
+		<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_InvoiceCF687 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_InvoiceProductRel5 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">
-			<KEY/>
-                        <NOTNULL/>
-                </field>
-                <field name="reminder_time" type="I" size="11">
-                        <NOTNULL/>
-                </field>
-                <field name="reminder_sent" type="I" size="2">
-                        <NOTNULL/>
-		</field>
-		<field name="recurringid" type="I" size="19">
-			<KEY/>
-			<NOTNULL/>
-		</field>
-                <data>
-                </data>
-        </table>
+		<field name="activity_id" type="I" size="11">
+			<key />
+			<notnull />
+		</field>
+		<field name="reminder_time" type="I" size="11">
+			<notnull />
+		</field>
+		<field name="reminder_sent" type="I" size="2">
+			<notnull />
+		</field>
+		<field name="activity_id" type="I" size="11">
+			<key />
+			<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">
-		<KEY/>
+			<key />
+			<notnull />
+			<constraint>REFERENCES customview (cvid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="columnindex" type="I" size="11">
-		     <KEY/>	
-		     <NOTNULL/>
+			<key />
+			<notnull />
 		</field>
 		<field name="columnname" type="C" size="250">
-		      <DEFAULT value=""/>
-		</field>
-		<index name="cvcolumnlist_IDX0">
+			<default value="" />
+		</field>
+
+		<index name="cvcolumnlist_columnindex_idx">
+			<col>columnindex</col>
+		</index>
+		<index name="cvcolumnlist_cvid_idx">
 			<col>cvid</col>
 		</index>
-		<index name="columnindex">
-			<col>columnindex</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">
-		<KEY/>
+			<key />
+			<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="0000-00-00"/>
+			<default value="NULL" />
 		</field>
 		<field name="enddate" type="D">
-			<DEFAULT value="0000-00-00"/>
-		</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">
-			<KEY/>
+			<key />
+			<constraint>REFERENCES customview (cvid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="columnindex" type="I" size="11">
-			<KEY/>
-			<NOTNULL/>
+			<key />
+			<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>
-	
+			<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/>
-                </field>
-                <field name="startindex" type="I" size="19">
-                        <DEFAULT value="0"/>
-                </field>
+		<field name="queryid" type="I" size="19">
+			<key />
+		</field>
+		<field name="startindex" type="I" size="19">
+			<default value="0" />
+		</field>
 		<field name="numofobjects" type="I" size="19">
-                        <DEFAULT value="0"/>
-                </field>
-                <index name="selectquery_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">
-		<KEY/>
+			<key />
+			<constraint>REFERENCES selectquery (queryid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="columnindex" type="I" size="11">
-		     <KEY/>	
-		     <NOTNULL/>
-		     <DEFAULT value="0"/>
+			<key />
+			<notnull />
+			<default value="0" />
 		</field>
 		<field name="columnname" type="C" size="250">
-		      <DEFAULT value=""/>
-		</field>
-		<index name="selectcolumn_IDX0">
+			<default value="" />
+		</field>
+
+		<index name="selectcolumn_queryid_idx">
 			<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>
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="relcriteria">
 		<field name="queryid" type="I" size="19">
-		<KEY/>
+			<key />
+			<constraint>REFERENCES selectquery (queryid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="columnindex" type="I" size="11">
-			<KEY/>
-			<NOTNULL/>
+			<key />
+			<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">
+			<default value="" />
+		</field>
+
+		<index name="relcriteria_queryid_idx">
 			<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>
+		<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">
-			<KEY/>
+			<key />
 		</field>
 		<field name="reportid" type="I" size="19">
-			<KEY/>
+			<key />
+			<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>
-		<opt>Type=InnoDB</opt>
-		<data></data>
-	</table>
-	<table name="reportsortcol" alter="true">
-		<constraint>ADD CONSTRAINT FK1_reportsortcol FOREIGN KEY (reportid) REFERENCES report(reportid) ON DELETE CASCADE</constraint>
-		<opt>Type=InnoDB</opt>
-		<data></data>
+			<default value="Asc" />
+		</field>
+
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="reportdatefilter">
 		<field name="datefilterid" type="I" size="19">
-			<KEY/>
+			<key />
+			<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="0000-00-00"/>
+			<default value="NULL" />
 		</field>
 		<field name="enddate" type="D">
-			<DEFAULT value="0000-00-00"/>
-		</field>
-		<opt>Type=InnoDB</opt>
-		<data></data>
-	</table>
-	<table name="reportdatefilter" alter="true">
-		<constraint>ADD CONSTRAINT FK1_reportdatefilter FOREIGN KEY (datefilterid) REFERENCES report(reportid) ON DELETE CASCADE</constraint>
-		<opt>Type=InnoDB</opt>
-		<data></data>
-	</table>
-	
+			<default value="NULL" />
+		</field>
+
+		<index name="reportdatefilter_datefilterid_idx">
+			<col>datefilterid</col>
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
+
 	<table name="reportsummary">
 		<field name="reportsummaryid" type="I" size="19">
-			<KEY/>
+			<key />
+			<constraint>REFERENCES report (reportid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="summarytype" type="I" size="19">
-			<KEY/>
+			<key />
 		</field>
 		<field name="columnname" type="C" size="250">
-			<KEY/>
-			<DEFAULT value=""/>
-		</field>
-		<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>
+			<key />
+			<default value="" />
+		</field>
+
+		<index name="reportsummary_reportsummaryid_idx">
+			<col>reportsummaryid</col>
+		</index>
+		<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/>
+			<notnull />
 		</field>
 		<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>
-		<opt>Type=InnoDB</opt> <index name="UsageUnit_UK0">
-			<UNIQUE/>
+			<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/>
+			<notnull />
 		</field>
 		<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>
-		<opt>Type=InnoDB</opt> <index name="GlAcct_UK0">
-			<UNIQUE/>
+			<notnull />
+			<default value="1" />
+		</field>
+
+		<index name="glacct_glacct_idx">
 			<col>glacct</col>
-		</index>
-		<data>
-		</data>
-	</table>
-
-
-
-
-
-
+			<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/>
+			<notnull />
 		</field>
 		<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>
-		<opt>Type=InnoDB</opt> <index name="quotestage_UK0">
-			<UNIQUE/>
+			<notnull />
+			<default value="1" />
+		</field>
+
+		<index name="quotestage_quotestage_idx">
 			<col>quotestage</col>
-		</index>
-		<data>
-		</data>
-	</table>
-
-
+			<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/>
+			<notnull />
 		</field>
 		<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>
-		<opt>Type=InnoDB</opt> <index name="invoicestatus_UK0">
-			<UNIQUE/>
+			<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/>
+			<notnull />
 		</field>
 		<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>
-		<opt>Type=InnoDB</opt> <index name="postatus_UK0">
-			<UNIQUE/>
+			<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/>
+			<notnull />
 		</field>
 		<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>
-		<opt>Type=InnoDB</opt> <index name="sostatus_UK0">
-			<UNIQUE/>
+			<notnull />
+			<default value="1" />
+		</field>
+
+		<index name="sostatus_sostatus_idx">
 			<col>sostatus</col>
-		</index>
-		<data>
-		</data>
-
-	</table>
-
-
-
-
-
-
-
-
+			<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/>
+			<notnull />
 		</field>
 		<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>
-		<opt>Type=InnoDB</opt> <index name="carrier_UK01">
-			<UNIQUE/>
+			<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/>
+			<notnull />
 		</field>
 		<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>
-		<opt>Type=InnoDB</opt> <index name="carrier_UK02">
-			<UNIQUE/>
+			<notnull />
+			<default value="1" />
+		</field>
+
+		<index name="taxclass_carrier_idx">
 			<col>taxclass</col>
-		</index>
-		<data>
-		</data>
+			<unique />
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="organizationdetails">
 		<field name="organizationame" type="C" size="60">
-			<KEY/>
-		</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="100"></field>
-		<field name="logoname" type="C" size="50"></field>
-		<field name="logo" type="X"></field>
-		<opt>Type=InnoDB</opt>
-		<data>
-		</data>
+			<key />
+		</field>
+		<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="100" />
+		<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/>
+			<notnull />
 		</field>
 		<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>
-		<opt>Type=InnoDB</opt> <index name="RecurringEvent_UK0">
-			<UNIQUE/>
+			<notnull />
+			<default value="1" />
+		</field>
+
+		<index name="recurringtype_status_idx">
 			<col>recurringtype</col>
-		</index>
-		<data>
-
-		</data>
-	</table>
-
-
-
-
-
-
-
-
+			<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>
-	</table>
-
-       <table name="inventory_tandc">
-             <field name="id" type="I" size="19">
-              <KEY/></field>
-             <field name="type" type="C" size="30">
-              <NOTNULL/></field>
-             <field name="tandc" type="X"></field>
-        </table>
-
+		<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="inventory_tandc">
+		<field name="id" type="I" size="19">
+			<key />
+		</field>
+		<field name="type" type="C" size="30">
+			<notnull />
+		</field>
+		<field name="tandc" type="X" />
+	</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>
-
-	<table name="profile2globalpermissions" alter="true">
-	<constraint>ADD CONSTRAINT fk_profile2globalpermissions57 FOREIGN KEY (profileid) REFERENCES profile(profileid) ON DELETE CASCADE</constraint>
-		<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>
 
 	<table name="actionmapping">
 		<field name="actionid" type="I" size="19">
-			<KEY/>
+			<key />
 		</field>
 		<field name="actionname" type="C" size="200">
-			<KEY/>
-		</field>
-		<field name="securitycheck" type="I" size="19">
-		</field>
-		<opt>Type=InnoDB</opt>
-		<data>
-		</data>
-	</table>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+			<key />
+		</field>
+		<field name="securitycheck" type="I" size="19" />
+
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="org_share_action2tab">
 		<field name="share_action_id" type="I" size="19">
-			<KEY/>
+			<key />
+			<constraint>REFERENCES org_share_action_mapping(share_action_id) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="tabid" type="I" size="19">
-			<KEY/>
-		</field>
-		<opt>Type=InnoDB</opt>
-		<data>
-		</data>
-	</table>
-	<table name="org_share_action2tab" alter="true">
-		<constraint>ADD CONSTRAINT fk_org_share_action2tab123 FOREIGN KEY (share_action_id) REFERENCES org_share_action_mapping(share_action_id) ON DELETE CASCADE</constraint>
-		<opt>Type=InnoDB</opt>
-		<data>
-		</data>
-	</table>
-
-	<table name="org_share_action2tab" alter="true">
-		<constraint>ADD CONSTRAINT fk_org_share_action2tab12345 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>
+
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="moduleowners">
-                <field name="tabid" type="I" size="19">
-			<KEY/>
-                        <UNIQUE/>
-                        <DEFAULT value="0"/>
-                </field>
-                <field name="user_id" type="C" size="11">
-                        <NOTNULL/>
-                </field>
-                <opt>Type=InnoDB</opt>
- <index name="moduleowners_UK11">
-			
+		<field name="tabid" type="I" size="19">
+			<key />
+			<unique />
+			<default value="0" />
+			<constraint>REFERENCES tab(tabid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="user_id" type="C" size="11">
+			<notnull />
+		</field>
+		<index name="moduleowners_tabid_user_id_idx">
 			<col>tabid</col>
 			<col>user_id</col>
 		</index>
-        </table>
-
-
-
-        <table name="moduleowners" alter="true">
-        <constraint>ADD CONSTRAINT fk_ModuleOwners123 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="ownernotify">
-        <field name="crmid" type="I" size="19">
-        </field>
-        <field name="smownerid" type="I" size="19">
-        </field>
-        <field name="flag" type="I" size="3">
-        </field>
-        <opt>Type=InnoDB</opt>
- <index name="ownernotify_UK1">
-			
+		<field name="crmid" type="I" size="19" />
+		<field name="smownerid" type="I" size="19" />
+		<field name="flag" type="I" size="3" />
+
+		<index name="ownernotify_crmid_flag_idx">
 			<col>crmid</col>
 			<col>flag</col>
-				
-		</index>
-        <data>
-        </data>
-    </table>	
-
-
-
-
-
-
-
-
-
-
-
-
-
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="datashare_module_rel">
-                <field name="shareid" type="I" size="19">
-			<KEY/>
-                </field>
-                <field name="tabid" type="I" size="19">
-                        <NOTNULL/>
-                </field>
+		<field name="shareid" type="I" size="19">
+			<key />
+		</field>
+		<field name="tabid" type="I" size="19">
+			<notnull />
+			<constraint>REFERENCES tab(tabid) ON DELETE CASCADE</constraint>
+		</field>
 		<field name="relationtype" type="C" size="200">
-                </field>
-		<opt>Type=InnoDB</opt>
+		</field>
+		<opt platform="mysql">Type=InnoDB</opt>
 		<index name="idx_datashare_module_rel_tabid">
-                        <col>tabid</col>
-                </index>
-		
-        </table>
-	<table name="datashare_module_rel" alter="true">
-        <constraint>ADD CONSTRAINT fk_datashare_module_rel456 FOREIGN KEY (tabid) REFERENCES tab(tabid) ON DELETE CASCADE</constraint>
-                <opt>Type=InnoDB</opt>
-                <data>
-                </data>
-        </table>
+			<col>tabid</col>
+		</index>
+	</table>
 
 	<table name="datashare_grp2grp">
-                <field name="shareid" type="I" size="19">
-			<KEY/>
-                </field>
-                <field name="share_groupid" type="I" size="19">
-                </field>
+		<field name="shareid" type="I" size="19">
+			<key />
+			<constraint>REFERENCES datashare_module_rel(shareid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="share_groupid" type="I" size="19">
+			<constraint>REFERENCES groups(groupid) ON DELETE CASCADE</constraint>
+		</field>
 		<field name="to_groupid" type="I" size="19">
-                </field>
-		<field name="permission" type="I" size="19">
-                </field>
-		<opt>Type=InnoDB</opt>
-		<index name="idx_datashare_grp2grp_share_groupid">
-                        <col>share_groupid</col>
-                </index>
-		<index name="idx_datashare_grp2grp_to_groupid">
-                        <col>to_groupid</col>
-                </index>	
-        </table>
-        <table name="datashare_grp2grp" alter="true">
-        <constraint>ADD CONSTRAINT fk_datashare_grp2grp789 FOREIGN KEY (shareid) REFERENCES datashare_module_rel(shareid) ON DELETE CASCADE</constraint>
-                <opt>Type=InnoDB</opt>
-                <data>
-                </data>
-        </table>
-	<table name="datashare_grp2grp" alter="true">
-        <constraint>ADD CONSTRAINT fk_datashare_grp2grp1 FOREIGN KEY (share_groupid) REFERENCES groups(groupid) ON DELETE CASCADE</constraint>
-                <opt>Type=InnoDB</opt>
-                <data>
-                </data>
-        </table>
-	<table name="datashare_grp2grp" alter="true">
-        <constraint>ADD CONSTRAINT fk_datashare_grp2grp2 FOREIGN KEY (to_groupid) REFERENCES groups(groupid) ON DELETE CASCADE</constraint>
-                <opt>Type=InnoDB</opt>
-                <data>
-                </data>
-        </table>
-
+			<constraint>REFERENCES groups(groupid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="permission" type="I" size="19" />
+
+		<index name="datashare_grp2grp_share_groupid_idx">
+			<col>share_groupid</col>
+		</index>
+		<index name="datashare_grp2grp_to_groupid_idx">
+			<col>to_groupid</col>
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="datashare_grp2role">
-                <field name="shareid" type="I" size="19">
-			<KEY/>
-                </field>
-                <field name="share_groupid" type="I" size="19">
-                </field>
+		<field name="shareid" type="I" size="19">
+			<key />
+			<constraint>REFERENCES datashare_module_rel(shareid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="share_groupid" type="I" size="19">
+			<constraint>REFERENCES groups(groupid) ON DELETE CASCADE</constraint>
+		</field>
 		<field name="to_roleid" type="C" size="255">
-                </field>
-		<field name="permission" type="I" size="19">
-                </field>
-		<opt>Type=InnoDB</opt>
+			<constraint>REFERENCES role(roleid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="permission" type="I" size="19" />
+
 		<index name="idx_datashare_grp2role_share_groupid">
-                        <col>share_groupid</col>
-                </index>
+			<col>share_groupid</col>
+		</index>
 		<index name="idx_datashare_grp2role_to_roleid">
-                        <col>to_roleid</col>
-                </index>	
-        </table>
-        <table name="datashare_grp2role" alter="true">
-        <constraint>ADD CONSTRAINT fk_datashare_grp2role345 FOREIGN KEY (shareid) REFERENCES datashare_module_rel(shareid) ON DELETE CASCADE</constraint>
-                <opt>Type=InnoDB</opt>
-                <data>
-                </data>
-        </table>
-	<table name="datashare_grp2role" alter="true">
-        <constraint>ADD CONSTRAINT fk_datashare_grp2role1 FOREIGN KEY (share_groupid) REFERENCES groups(groupid) ON DELETE CASCADE</constraint>
-                <opt>Type=InnoDB</opt>
-                <data>
-                </data>
-        </table>
-	<table name="datashare_grp2role" alter="true">
-        <constraint>ADD CONSTRAINT fk_datashare_grp2role2 FOREIGN KEY (to_roleid) REFERENCES role(roleid) ON DELETE CASCADE</constraint>
-                <opt>Type=InnoDB</opt>
-                <data>
-                </data>
-        </table>
+			<col>to_roleid</col>
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="datashare_grp2rs">
-                <field name="shareid" type="I" size="19">
-			<KEY/>
-                </field>
-                <field name="share_groupid" type="I" size="19">
-                </field>
+		<field name="shareid" type="I" size="19">
+			<key />
+			<constraint>REFERENCES datashare_module_rel(shareid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="share_groupid" type="I" size="19">
+			<constraint>REFERENCES groups(groupid) ON DELETE CASCADE</constraint>
+		</field>
 		<field name="to_roleandsubid" type="C" size="255">
-                </field>
-		<field name="permission" type="I" size="19">
-                </field>
-		<opt>Type=InnoDB</opt>
-		<index name="idx_datashare_grp2rs_share_groupid">
-                        <col>share_groupid</col>
-                </index>
-		<index name="idx_datashare_grp2rs_to_roleandsubid">
-                        <col>to_roleandsubid</col>
-                </index>	
-        </table>
-        <table name="datashare_grp2rs" alter="true">
-        <constraint>ADD CONSTRAINT fk_datashare_grp2rs36 FOREIGN KEY (shareid) REFERENCES datashare_module_rel(shareid) ON DELETE CASCADE</constraint>
-                <opt>Type=InnoDB</opt>
-                <data>
-                </data>
-        </table>
-	<table name="datashare_grp2rs" alter="true">
-        <constraint>ADD CONSTRAINT fk_datashare_grp2rs1 FOREIGN KEY (share_groupid) REFERENCES groups(groupid) ON DELETE CASCADE</constraint>
-                <opt>Type=InnoDB</opt>
-                <data>
-                </data>
-        </table>
-	<table name="datashare_grp2rs" alter="true">
-        <constraint>ADD CONSTRAINT fk_datashare_grp2rs3 FOREIGN KEY (to_roleandsubid) REFERENCES role(roleid) ON DELETE CASCADE</constraint>
-                <opt>Type=InnoDB</opt>
-                <data>
-                </data>
-        </table>
-
-
-
-
-
-
-
+			<constraint>REFERENCES role(roleid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="permission" type="I" size="19" />
+
+		<index name="datashare_grp2rs_share_groupid_idx">
+			<col>share_groupid</col>
+		</index>
+		<index name="datashare_grp2rs_to_roleandsubid_idx">
+			<col>to_roleandsubid</col>
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="datashare_role2group">
-                <field name="shareid" type="I" size="19">
-			<KEY/>
-                </field>
-                <field name="share_roleid" type="C" size="255">
-                </field>
+		<field name="shareid" type="I" size="19">
+			<key />
+			<constraint>REFERENCES datashare_module_rel(shareid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="share_roleid" type="C" size="255">
+			<constraint>REFERENCES role(roleid) ON DELETE CASCADE</constraint>
+		</field>
 		<field name="to_groupid" type="I" size="19">
-                </field>
-		<field name="permission" type="I" size="19">
-                </field>
-		<opt>Type=InnoDB</opt>
+			<constraint>REFERENCES groups(groupid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="permission" type="I" size="19" />
+
 		<index name="idx_datashare_role2group_share_roleid">
-                        <col>share_roleid</col>
-                </index>
+			<col>share_roleid</col>
+		</index>
 		<index name="idx_datashare_role2group_to_groupid">
-                        <col>to_groupid</col>
-                </index>	
-        </table>
-        <table name="datashare_role2group" alter="true">
-        <constraint>ADD CONSTRAINT fk_datashare_role2group568 FOREIGN KEY (shareid) REFERENCES datashare_module_rel(shareid) ON DELETE CASCADE</constraint>
-                <opt>Type=InnoDB</opt>
-                <data>
-                </data>
-        </table>
-	<table name="datashare_role2group" alter="true">
-        <constraint>ADD CONSTRAINT fk_datashare_role2group1 FOREIGN KEY (share_roleid) REFERENCES role(roleid) ON DELETE CASCADE</constraint>
-                <opt>Type=InnoDB</opt>
-                <data>
-                </data>
-        </table>
-	<table name="datashare_role2group" alter="true">
-        <constraint>ADD CONSTRAINT fk_datashare_role2group3 FOREIGN KEY (to_groupid) REFERENCES groups(groupid) ON DELETE CASCADE</constraint>
-                <opt>Type=InnoDB</opt>
-                <data>
-                </data>
-        </table>
-
+			<col>to_groupid</col>
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="datashare_role2role">
-                <field name="shareid" type="I" size="19">
-			<KEY/>
-                </field>
-                <field name="share_roleid" type="C" size="255">
-                </field>
+		<field name="shareid" type="I" size="19">
+			<key />
+			<constraint>REFERENCES datashare_module_rel(shareid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="share_roleid" type="C" size="255">
+			<constraint>REFERENCES role(roleid) ON DELETE CASCADE</constraint>
+		</field>
 		<field name="to_roleid" type="C" size="255">
-                </field>
-		<field name="permission" type="I" size="19">
-                </field>
-		<opt>Type=InnoDB</opt>
-		<index name="idx_datashare_role2role_share_roleid">
-                        <col>share_roleid</col>
-                </index>
-		<index name="idx_datashare_role2role_to_roleid">
-                        <col>to_roleid</col>
-                </index>	
-        </table>
-        <table name="datashare_role2role" alter="true">
-        <constraint>ADD CONSTRAINT fk_datashare_role2role345 FOREIGN KEY (shareid) REFERENCES datashare_module_rel(shareid) ON DELETE CASCADE</constraint>
-                <opt>Type=InnoDB</opt>
-                <data>
-                </data>
-        </table>
-	<table name="datashare_role2role" alter="true">
-        <constraint>ADD CONSTRAINT fk_datashare_role2role1 FOREIGN KEY (share_roleid) REFERENCES role(roleid) ON DELETE CASCADE</constraint>
-                <opt>Type=InnoDB</opt>
-                <data>
-                </data>
-        </table>
-	<table name="datashare_role2role" alter="true">
-        <constraint>ADD CONSTRAINT fk_datashare_role2role3 FOREIGN KEY (to_roleid) REFERENCES role(roleid) ON DELETE CASCADE</constraint>
-                <opt>Type=InnoDB</opt>
-                <data>
-                </data>
-        </table>
-
+			<constraint>REFERENCES role(roleid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="permission" type="I" size="19" />
+
+		<index name="datashare_role2role_share_roleid_idx">
+			<col>share_roleid</col>
+		</index>
+		<index name="datashare_role2role_to_roleid_idx">
+			<col>to_roleid</col>
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="datashare_role2rs">
-                <field name="shareid" type="I" size="19">
-			<KEY/>
-                </field>
-                <field name="share_roleid" type="C" size="255">
-                </field>
+		<field name="shareid" type="I" size="19">
+			<key />
+			<constraint>REFERENCES datashare_module_rel(shareid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="share_roleid" type="C" size="255">
+			<constraint>REFERENCES role(roleid) ON DELETE CASCADE</constraint>
+		</field>
 		<field name="to_roleandsubid" type="C" size="255">
-                </field>
-		<field name="permission" type="I" size="19">
-                </field>
-		<opt>Type=InnoDB</opt>
-		<index name="idx_datashare_role2s_share_roleid">
-                        <col>share_roleid</col>
-                </index>
-		<index name="idx_datashare_role2s_to_roleandsubid">
-                        <col>to_roleandsubid</col>
-                </index>	
-        </table>
-        <table name="datashare_role2rs" alter="true">
-        <constraint>ADD CONSTRAINT fk_datashare_role2rs987 FOREIGN KEY (shareid) REFERENCES datashare_module_rel(shareid) ON DELETE CASCADE</constraint>
-                <opt>Type=InnoDB</opt>
-                <data>
-                </data>
-        </table>
-	<table name="datashare_role2rs" alter="true">
-        <constraint>ADD CONSTRAINT fk_datashare_role2rs1 FOREIGN KEY (share_roleid) REFERENCES role(roleid) ON DELETE CASCADE</constraint>
-                <opt>Type=InnoDB</opt>
-                <data>
-                </data>
-        </table>
-	<table name="datashare_role2rs" alter="true">
-        <constraint>ADD CONSTRAINT fk_datashare_role2rs3 FOREIGN KEY (to_roleandsubid) REFERENCES role(roleid) ON DELETE CASCADE</constraint>
-                <opt>Type=InnoDB</opt>
-                <data>
-                </data>
-        </table>
-
-
-
-
-
-
-
-
-
-
-
+			<constraint>REFERENCES role(roleid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="permission" type="I" size="19" />
+
+		<index name="datashare_role2s_share_roleid_idx">
+			<col>share_roleid</col>
+		</index>
+		<index name="datashare_role2s_to_roleandsubid_idx">
+			<col>to_roleandsubid</col>
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="datashare_rs2grp">
-                <field name="shareid" type="I" size="19">
-			<KEY/>
-                </field>
-                <field name="share_roleandsubid" type="C" size="255">
-                </field>
+		<field name="shareid" type="I" size="19">
+			<key />
+			<constraint>REFERENCES datashare_module_rel(shareid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="share_roleandsubid" type="C" size="255">
+			<constraint>REFERENCES role(roleid) ON DELETE CASCADE</constraint>
+		</field>
 		<field name="to_groupid" type="I" size="19">
-                </field>
-		<field name="permission" type="I" size="19">
-                </field>
-		<opt>Type=InnoDB</opt>
-		<index name="idx_datashare_rs2grp_share_roleandsubid">
-                        <col>share_roleandsubid</col>
-                </index>
-		<index name="idx_datashare_rs2grp_to_groupid">
-                        <col>to_groupid</col>
-                </index>	
-        </table>
-        <table name="datashare_rs2grp" alter="true">
-        <constraint>ADD CONSTRAINT fk_datashare_rs2grpQ2 FOREIGN KEY (shareid) REFERENCES datashare_module_rel(shareid) ON DELETE CASCADE</constraint>
-                <opt>Type=InnoDB</opt>
-                <data>
-                </data>
-        </table>
-	<table name="datashare_rs2grp" alter="true">
-        <constraint>ADD CONSTRAINT fk_datashare_rs2grp1 FOREIGN KEY (share_roleandsubid) REFERENCES role(roleid) ON DELETE CASCADE</constraint>
-                <opt>Type=InnoDB</opt>
-                <data>
-                </data>
-        </table>
-	<table name="datashare_rs2grp" alter="true">
-        <constraint>ADD CONSTRAINT fk_datashare_rs2grp2 FOREIGN KEY (to_groupid) REFERENCES groups(groupid) ON DELETE CASCADE</constraint>
-                <opt>Type=InnoDB</opt>
-                <data>
-                </data>
-        </table>
-
-
-
-
-
-
-
-
-
-
-
-
-
+			<constraint>REFERENCES groups(groupid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="permission" type="I" size="19" />
+
+		<index name="datashare_rs2grp_share_roleandsubid_idx">
+			<col>share_roleandsubid</col>
+		</index>
+		<index name="datashare_rs2grp_to_groupid_idx">
+			<col>to_groupid</col>
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="datashare_rs2role">
-                <field name="shareid" type="I" size="19">
-			<KEY/>
-                </field>
-                <field name="share_roleandsubid" type="C" size="255">
-                </field>
+		<field name="shareid" type="I" size="19">
+			<key />
+			<constraint>REFERENCES datashare_module_rel(shareid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="share_roleandsubid" type="C" size="255">
+			<constraint>REFERENCES role(roleid) ON DELETE CASCADE</constraint>
+		</field>
 		<field name="to_roleid" type="C" size="255">
-                </field>
-		<field name="permission" type="I" size="19">
-                </field>
-		<opt>Type=InnoDB</opt>
-		<index name="idx_datashare_rs2role_share_roleandsubid">
-                        <col>share_roleandsubid</col>
-                </index>
-		<index name="idx_datashare_rs2role_to_roleid">
-                        <col>to_roleid</col>
-                </index>	
-        </table>
-        <table name="datashare_rs2role" alter="true">
-        <constraint>ADD CONSTRAINT fk_datashare_rs2role122 FOREIGN KEY (shareid) REFERENCES datashare_module_rel(shareid) ON DELETE CASCADE</constraint>
-                <opt>Type=InnoDB</opt>
-                <data>
-                </data>
-        </table>
-	<table name="datashare_rs2role" alter="true">
-        <constraint>ADD CONSTRAINT fk_datashare_rs2role1 FOREIGN KEY (share_roleandsubid) REFERENCES role(roleid) ON DELETE CASCADE</constraint>
-                <opt>Type=InnoDB</opt>
-                <data>
-                </data>
-        </table>
-	<table name="datashare_rs2role" alter="true">
-        <constraint>ADD CONSTRAINT fk_datashare_rs2role2 FOREIGN KEY (to_roleid) REFERENCES role(roleid) ON DELETE CASCADE</constraint>
-                <opt>Type=InnoDB</opt>
-                <data>
-                </data>
-        </table>
-
-
-
-
-
-
-
-
-
-
+			<constraint>REFERENCES role(roleid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="permission" type="I" size="19" />
+
+		<index name="datashare_rs2role_share_roleandsubid_idx">
+			<col>share_roleandsubid</col>
+		</index>
+		<index name="datashare_rs2role_to_roleid_idx">
+			<col>to_roleid</col>
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="datashare_rs2rs">
-                <field name="shareid" type="I" size="19">
-			<KEY/>
-                </field>
-                <field name="share_roleandsubid" type="C" size="255">
-                </field>
+		<field name="shareid" type="I" size="19">
+			<key />
+			<constraint>REFERENCES datashare_module_rel(shareid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="share_roleandsubid" type="C" size="255">
+			<constraint>REFERENCES role(roleid) ON DELETE CASCADE</constraint>
+		</field>
 		<field name="to_roleandsubid" type="C" size="255">
-                </field>
-		<field name="permission" type="I" size="19">
-                </field>
-		<opt>Type=InnoDB</opt>
-		<index name="idx_datashare_rs2rs_share_roleandsubid">
-                        <col>share_roleandsubid</col>
-                </index>
-		<index name="idx_datashare_rs2rs_to_roleandsubid">
-                        <col>to_roleandsubid</col>
-                </index>	
-        </table>
-        <table name="datashare_rs2rs" alter="true">
-        <constraint>ADD CONSTRAINT fk_datashare_rs2rs353 FOREIGN KEY (shareid) REFERENCES datashare_module_rel(shareid) ON DELETE CASCADE</constraint>
-                <opt>Type=InnoDB</opt>
-                <data>
-                </data>
-        </table>
-	<table name="datashare_rs2rs" alter="true">
-        <constraint>ADD CONSTRAINT fk_datashare_rs2rs1 FOREIGN KEY (share_roleandsubid) REFERENCES role(roleid) ON DELETE CASCADE</constraint>
-                <opt>Type=InnoDB</opt>
-                <data>
-                </data>
-        </table>
-	<table name="datashare_rs2rs" alter="true">
-        <constraint>ADD CONSTRAINT fk_datashare_rs2rs2 FOREIGN KEY (to_roleandsubid) REFERENCES role(roleid) ON DELETE CASCADE</constraint>
-                <opt>Type=InnoDB</opt>
-                <data>
-                </data>
-        </table>
-
-
-
-
-
-
+			<constraint>REFERENCES role(roleid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="permission" type="I" size="19" />
+
+		<index name="datashare_rs2rs_share_roleandsubid_idx">
+			<col>share_roleandsubid</col>
+		</index>
+		<index name="idx_datashare_rs2rs_to_roleandsubid_idx">
+			<col>to_roleandsubid</col>
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="datashare_relatedmodules">
-                <field name="datashare_relatedmodule_id" type="I" size="19">
-			<KEY/>
-                </field>
-                <field name="tabid" type="I" size="19">
-                </field>
+		<field name="datashare_relatedmodule_id" type="I" size="19">
+			<key />
+		</field>
+		<field name="tabid" type="I" size="19">
+			<constraint>REFERENCES tab(tabid) ON DELETE CASCADE</constraint>
+		</field>
 		<field name="relatedto_tabid" type="I" size="19">
-                </field>
-		<opt>Type=InnoDB</opt>
-		<index name="idx_datashare_relatedmodules_tabid">
-                        <col>tabid</col>
-                </index>
-		<index name="idx_datashare_relatedmodules_relatedto_tabid">
-                        <col>relatedto_tabid</col>
-                </index>	
-        </table>
-        <table name="datashare_relatedmodules" alter="true">
-        <constraint>ADD CONSTRAINT fk_datashare_relatedmodules123 FOREIGN KEY (tabid) REFERENCES tab(tabid) ON DELETE CASCADE</constraint>
-                <opt>Type=InnoDB</opt>
-                <data>
-                </data>
-        </table>
-	<table name="datashare_relatedmodules" alter="true">
-        <constraint>ADD CONSTRAINT fk_datashare_relatedmodules1 FOREIGN KEY (relatedto_tabid) REFERENCES tab(tabid) ON DELETE CASCADE</constraint>
-                <opt>Type=InnoDB</opt>
-                <data>
-                </data>
-        </table>
+			<constraint>REFERENCES tab(tabid) ON DELETE CASCADE</constraint>
+		</field>
+		<index name="datashare_relatedmodules_tabid_idx">
+			<col>tabid</col>
+		</index>
+		<index name="datashare_relatedmodules_relatedto_tabid_idx">
+			<col>relatedto_tabid</col>
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="datashare_relatedmodule_permission">
-                <field name="shareid" type="I" size="19">
-			<KEY/>
-                </field>
-                <field name="datashare_relatedmodule_id" type="I" size="19">
-			<KEY/>
-                </field>
-		<field name="permission" type="I" size="19">
-                </field>
-<opt>Type=InnoDB</opt>
- <index name="datashare_relatedmodule_permission_UK1">
-			
+		<field name="shareid" type="I" size="19">
+			<key />
+		</field>
+		<field name="datashare_relatedmodule_id" type="I" size="19">
+			<key />
+		</field>
+		<field name="permission" type="I" size="19" />
+
+		<index name="datashare_relatedmodule_permission_shareid_permissions_idx">
 			<col>shareid</col>
 			<col>permission</col>
-			</index>
-        </table>
-
-
-
-
-
-
-
-
-
-		
-     <table name="parenttab">
-        <field name="parenttabid" type="I" size="19"><NOTNULL/>
-			<KEY/>
-        </field>
-		<field name="parenttab_label" type="C" size="100"><NOTNULL/>
-        </field>
-		<field name="sequence" type="I" size="10"><NOTNULL/>
-        </field>
-		<field name="visible" type="I" size="2"><NOTNULL/><DEFAULT value="0"/>
-        </field>
- <index name="parenttab_UK1">
-			
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
+
+	<table name="parenttab">
+		<field name="parenttabid" type="I" size="19">
+			<notnull />
+			<key />
+		</field>
+		<field name="parenttab_label" type="C" size="100">
+			<notnull />
+		</field>
+		<field name="sequence" type="I" size="10">
+			<notnull />
+		</field>
+		<field name="visible" type="I" size="2">
+			<notnull />
+			<default value="0" />
+		</field>
+		<index name="parenttab_parenttabid_parenttabl_label_visible_idx">
 			<col>parenttabid</col>
 			<col>parenttab_label</col>
-				<col>visible</col>
-		</index>
-     </table>
-  		
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+			<col>visible</col>
+		</index>
+	</table>
 
 	<table name="tmp_read_user_sharing_per">
 		<field name="userid" type="I" size="11">
-			<KEY/>
+			<key />
+			<constraint>REFERENCES users(id) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="tabid" type="I" size="11">
-			<KEY/>
+			<key />
+			<constraint>REFERENCES tab(tabid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="shareduserid" type="I" size="11">
-			<KEY/>
-		</field>
-	        <opt>Type=InnoDB</opt>
-	 <index name="tmp_read_user_sharing_per_UK1">
-			
+			<key />
+			<constraint>REFERENCES users(id) ON DELETE CASCADE</constraint>
+		</field>
+
+		<index name="tmp_read_user_sharing_per_userid_shareduserid_idx">
 			<col>userid</col>
 			<col>shareduserid</col>
-		</index>	
-		<data>
-		
-		</data>
-	</table>
-
-	<table name="tmp_read_user_sharing_per" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_tmp_read_user_sharing_per1 FOREIGN KEY (userid) REFERENCES users(id) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
-	<table name="tmp_read_user_sharing_per" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_tmp_read_user_sharing_per2 FOREIGN KEY (tabid) REFERENCES tab(tabid) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-	<table name="tmp_read_user_sharing_per" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_tmp_read_user_sharing_per3 FOREIGN KEY (shareduserid) REFERENCES users(id) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
-
-
-
-
-
-
-
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="tmp_read_group_sharing_per">
 		<field name="userid" type="I" size="11">
-			<KEY/>
+			<key />
+			<constraint>REFERENCES users(id) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="tabid" type="I" size="11">
-			<KEY/>
+			<key />
+			<constraint>REFERENCES tab(tabid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="sharedgroupid" type="I" size="11">
-			<KEY/>
-		</field>
-	        <opt>Type=InnoDB</opt>
- <index name="tmp_read_group_sharing_per_UK1">
-			
+			<key />
+			<constraint>REFERENCES groups(groupid) ON DELETE CASCADE</constraint>
+		</field>
+
+		<index name="tmp_read_group_sharing_per_userid_sharedgroupid_idx">
 			<col>userid</col>
 			<col>sharedgroupid</col>
-		</index>		
-		<data>
-		
-		</data>
-	</table>
-
-
-	<table name="tmp_read_group_sharing_per" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_tmp_read_group_sharing_per1 FOREIGN KEY (userid) REFERENCES users(id) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
-	<table name="tmp_read_group_sharing_per" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_tmp_read_group_sharing_per2 FOREIGN KEY (tabid) REFERENCES tab(tabid) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table> 
-
-	<table name="tmp_read_group_sharing_per" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_tmp_read_group_sharing_per3 FOREIGN KEY (sharedgroupid) REFERENCES groups(groupid) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table> 
-
-	
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
+
 	<table name="tmp_write_user_sharing_per">
 		<field name="userid" type="I" size="11">
-			<KEY/>
+			<key />
+			<constraint>REFERENCES users(id) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="tabid" type="I" size="11">
-			<KEY/>
+			<key />
+			<constraint>REFERENCES tab(tabid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="shareduserid" type="I" size="11">
-			<KEY/>
-		</field>
-	        <opt>Type=InnoDB</opt>
- <index name="tmp_write_user_sharing_per_UK1">
-			
+			<key />
+			<constraint>REFERENCES users(id) ON DELETE CASCADE</constraint>
+		</field>
+
+		<index name="tmp_write_user_sharing_per_userid_shareduserid_idx">
 			<col>userid</col>
 			<col>shareduserid</col>
-		</index>		
-		<data>
-		
-		</data>
-	</table>
-
-
-	<table name="tmp_write_user_sharing_per" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_tmp_write_user_sharing_per1 FOREIGN KEY (userid) REFERENCES users(id) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
-	<table name="tmp_write_user_sharing_per" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_tmp_write_user_sharing_per2 FOREIGN KEY (tabid) REFERENCES tab(tabid) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table> 
-
-	<table name="tmp_write_user_sharing_per" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_tmp_write_user_sharing_per3 FOREIGN KEY (shareduserid) REFERENCES users(id) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="tmp_write_group_sharing_per">
 		<field name="userid" type="I" size="11">
-			<KEY/>
+			<key />
+			<constraint>REFERENCES users(id) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="tabid" type="I" size="11">
-			<KEY/>
+			<key />
+			<constraint>REFERENCES tab(tabid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="sharedgroupid" type="I" size="11">
-			<KEY/>
-		</field>
-	        <opt>Type=InnoDB</opt>	
- <index name="tmp_write_group_sharing_per_UK1">
-			
+			<key />
+			<constraint>REFERENCES groups(groupid) ON DELETE CASCADE</constraint>
+		</field>
+
+		<index name="tmp_write_group_sharing_per_UK1">
 			<col>userid</col>
 			<col>sharedgroupid</col>
-		</index>	
-		<data>
-		
-		</data>
-	</table>
-
-
-	<table name="tmp_write_group_sharing_per" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_tmp_write_group_sharing_per1 FOREIGN KEY (userid) REFERENCES users(id) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
-	<table name="tmp_write_group_sharing_per" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_tmp_write_group_sharing_per2 FOREIGN KEY (tabid) REFERENCES tab(tabid) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table> 
-
-	<table name="tmp_write_group_sharing_per" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_tmp_write_group_sharing_per3 FOREIGN KEY (sharedgroupid) REFERENCES groups(groupid) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table> 
-
-
-
-
-
-
-
-
-
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="tmp_read_user_rel_sharing_per">
 		<field name="userid" type="I" size="11">
-			<KEY/>
+			<key />
+			<constraint>REFERENCES users(id) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="tabid" type="I" size="11">
-			<KEY/>
+			<key />
+			<constraint>REFERENCES tab(tabid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="relatedtabid" type="I" size="11">
-			<KEY/>
+			<key />
+			<constraint>REFERENCES tab(tabid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="shareduserid" type="I" size="11">
-			<KEY/>
-		</field>
-	        <opt>Type=InnoDB</opt>	
- <index name="tmp_read_user_rel_sharing_per_UK1">
-			
+			<key />
+			<constraint>REFERENCES users(id) ON DELETE CASCADE</constraint>
+		</field>
+
+		<index name="tmp_read_user_rel_sharing_per_userid_shared_reltabid_idx">
 			<col>userid</col>
 			<col>shareduserid</col>
-				<col>relatedtabid</col>	
-		</index>	
-		<data>
-		
-		</data>
-	</table>
-
-
-	<table name="tmp_read_user_rel_sharing_per" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_tmp_read_user_rel_sharing_per1 FOREIGN KEY (userid) REFERENCES users(id) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
-	<table name="tmp_read_user_rel_sharing_per" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_tmp_read_user_rel_sharing_per2 FOREIGN KEY (tabid) REFERENCES tab(tabid) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-	<table name="tmp_read_user_rel_sharing_per" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_tmp_read_user_rel_sharing_per4 FOREIGN KEY (relatedtabid) REFERENCES tab(tabid) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table> 	 
-
-	<table name="tmp_read_user_rel_sharing_per" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_tmp_read_user_rel_sharing_per3 FOREIGN KEY (shareduserid) REFERENCES users(id) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
-
-
-
-
-
-
-
-
-
-
+			<col>relatedtabid</col>
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="tmp_read_group_rel_sharing_per">
 		<field name="userid" type="I" size="11">
-			<KEY/>
+			<key />
+			<constraint>REFERENCES users(id) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="tabid" type="I" size="11">
-			<KEY/>
+			<key />
+			<constraint>REFERENCES tab(tabid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="relatedtabid" type="I" size="11">
-			<KEY/>
+			<key />
+			<constraint>REFERENCES tab(tabid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="sharedgroupid" type="I" size="11">
-			<KEY/>
-		</field>
-	        <opt>Type=InnoDB</opt>	
-	 <index name="tmp_read_group_rel_sharing_per_UK1">
-			
+			<key />
+			<constraint>REFERENCES groups(groupid) ON DELETE CASCADE</constraint>
+		</field>
+
+		<index name="tmp_read_group_rel_sharing_per_userid_sharedgroupid_tabid">
 			<col>userid</col>
 			<col>sharedgroupid</col>
 			<col>tabid</col>
-		</index>	
-		<data>
-		
-		</data>
-	</table>
-
-
-	<table name="tmp_read_group_rel_sharing_per" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_tmp_read_group_rel_sharing_per1 FOREIGN KEY (userid) REFERENCES users(id) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
-	<table name="tmp_read_group_rel_sharing_per" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_tmp_read_group_rel_sharing_per2 FOREIGN KEY (tabid) REFERENCES tab(tabid) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-	<table name="tmp_read_group_rel_sharing_per" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_tmp_read_group_rel_sharing_per4 FOREIGN KEY (relatedtabid) REFERENCES tab(tabid) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table> 	 
-
-	<table name="tmp_read_group_rel_sharing_per" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_tmp_read_group_rel_sharing_per3 FOREIGN KEY (sharedgroupid) REFERENCES groups(groupid) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="tmp_write_user_rel_sharing_per">
 		<field name="userid" type="I" size="11">
-			<KEY/>
+			<key />
+			<constraint>REFERENCES users(id) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="tabid" type="I" size="11">
-			<KEY/>
+			<key />
+			<constraint>REFERENCES tab(tabid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="relatedtabid" type="I" size="11">
-			<KEY/>
+			<key />
+			<constraint>REFERENCES tab(tabid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="shareduserid" type="I" size="11">
-			<KEY/>
-		</field>
-	        <opt>Type=InnoDB</opt>
- <index name="tmp_write_user_rel_sharing_per_UK1">
-			
+			<key />
+			<constraint>REFERENCES users(id) ON DELETE CASCADE</constraint>
+		</field>
+
+		<index name="tmp_write_user_rel_sharing_per_userid_sharduserid_tabid_idx">
 			<col>userid</col>
 			<col>shareduserid</col>
-				<col>tabid</col>
-		</index>		
-		<data>
-		
-		</data>
-	</table>
-
-
-	<table name="tmp_write_user_rel_sharing_per" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_tmp_write_user_rel_sharing_per1 FOREIGN KEY (userid) REFERENCES users(id) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
-	<table name="tmp_write_user_rel_sharing_per" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_tmp_write_user_rel_sharing_per2 FOREIGN KEY (tabid) REFERENCES tab(tabid) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-	<table name="tmp_write_user_rel_sharing_per" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_tmp_write_user_rel_sharing_per4 FOREIGN KEY (relatedtabid) REFERENCES tab(tabid) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table> 	 
-
-	<table name="tmp_write_user_rel_sharing_per" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_tmp_write_user_rel_sharing_per3 FOREIGN KEY (shareduserid) REFERENCES users(id) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
-
-
-
-
-
-
+			<col>tabid</col>
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="tmp_write_group_rel_sharing_per">
 		<field name="userid" type="I" size="11">
-			<KEY/>
+			<key />
+			<constraint>REFERENCES users(id) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="tabid" type="I" size="11">
-			<KEY/>
+			<key />
+			<constraint>REFERENCES tab(tabid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="relatedtabid" type="I" size="11">
-			<KEY/>
+			<key />
+			<constraint>REFERENCES tab(tabid) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="sharedgroupid" type="I" size="11">
-			<KEY/>
-		</field>
-	        <opt>Type=InnoDB</opt>	
- <index name="tmp_write_group_rel_sharing_per_UK1">
-			
+			<key />
+			<constraint>REFERENCES groups(groupid) ON DELETE CASCADE</constraint>
+		</field>
+
+		<index name="tmp_write_group_rel_sharing_per_userid_sharedgroupid_tabid_idx">
 			<col>userid</col>
 			<col>sharedgroupid</col>
-				<col>tabid</col>
-		</index>
-		<data>
-		
-		</data>
-	</table>
-
-
-	<table name="tmp_write_group_rel_sharing_per" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_tmp_write_group_rel_sharing_per1 FOREIGN KEY (userid) REFERENCES users(id) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
-	<table name="tmp_write_group_rel_sharing_per" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_tmp_write_group_rel_sharing_per2 FOREIGN KEY (tabid) REFERENCES tab(tabid) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-	<table name="tmp_write_group_rel_sharing_per" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_tmp_write_group_rel_sharing_per4 FOREIGN KEY (relatedtabid) REFERENCES tab(tabid) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table> 	 
-
-	<table name="tmp_write_group_rel_sharing_per" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_tmp_write_group_rel_sharing_per3 FOREIGN KEY (sharedgroupid) REFERENCES groups(groupid) ON DELETE CASCADE </constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
-
-
-
-
-
-
-		<table name="parenttabrel">
-        <field name="parenttabid" type="I" size="3"><NOTNULL/>
-        </field>
-		<field name="tabid" type="I" size="3"><NOTNULL/>
-		</field>
-		<field name="sequence" type="I" size="3"><NOTNULL/>
-        </field>
-	<opt>Type=InnoDB</opt> <index name="parenttabrelUK01">
+			<col>tabid</col>
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
+
+	<table name="parenttabrel">
+		<field name="parenttabid" type="I" size="3">
+			<notnull />
+		</field>
+		<field name="tabid" type="I" size="3">
+			<notnull />
+		</field>
+		<field name="sequence" type="I" size="3">
+			<notnull />
+		</field>
+
+		<index name="parenttabrel_tabid_parenttabid_idx">
 			<col>tabid</col>
 			<col>parenttabid</col>
 		</index>
-     </table>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="campaigntype">
 		<field name="campaigntypeid" type="I" size="19">
-			<KEY/>
-	<AUTOINCREMENT/>
-		
+			<key />
+			<autoincrement />
 		</field>
 		<field name="campaigntype" type="C" size="200">
-			<NOTNULL/>
+			<notnull />
 		</field>
 		<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>
-		<opt>Type=InnoDB</opt> <index name="Campaigntype_UK01">
-			<UNIQUE/>
+			<notnull />
+			<default value="1" />
+		</field>
+
+		<index name="campaigntype_campaigntype_idx">
 			<col>campaigntype</col>
-		</index>
-		<data>
-		</data>
+			<unique />
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="campaignstatus">
 		<field name="campaignstatusid" type="I" size="19">
-			<KEY/>
-	<AUTOINCREMENT/>
-		
+			<key />
+			<autoincrement />
 		</field>
 		<field name="campaignstatus" type="C" size="200">
-			<NOTNULL/>
+			<notnull />
 		</field>
 		<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>
-		<opt>Type=InnoDB</opt>
-	 <index name="Campaignstatus_UK01">
-			
+			<notnull />
+			<default value="1" />
+		</field>
+
+		<index name="campaignstatus_campaignstatus_idx">
 			<col>campaignstatus</col>
 		</index>
-		<data>
-		</data>
-	</table>
-	
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
+
 	<table name="expectedresponse">
 		<field name="expectedresponseid" type="I" size="19">
-			<KEY/>
-	<AUTOINCREMENT/>
-		
+			<key />
+			<autoincrement />
 		</field>
 		<field name="expectedresponse" type="C" size="200">
-			<NOTNULL/>
+			<notnull />
 		</field>
 		<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>
-		<opt>Type=InnoDB</opt> <index name="CampaignExpRes_UK01">
-			<UNIQUE/>
+			<notnull />
+			<default value="1" />
+		</field>
+
+		<index name="CampaignExpRes_UK01">
 			<col>expectedresponse</col>
-		</index>
-		<data>
-		</data>
+			<unique />
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
 	<table name="portal">
 		<field name="portalid" type="I" size="19">
-			<KEY/>
+			<key />
 		</field>
 		<field name="portalname" type="C" size="200">
-			<NOTNULL/>
+			<notnull />
 		</field>
 		<field name="portalurl" type="C" size="255">
-			<NOTNULL/>
+			<notnull />
 		</field>
 		<field name="sequence" type="I" size="3">
-			<NOTNULL/>
-		</field>
-	<opt>Type=InnoDB</opt>
-	 <index name="portal_UK01">
+			<notnull />
+		</field>
+
+		<index name="portal_portalname_idx">
 			<col>portalname</col>
 		</index>
-	</table>
-
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="announcement">
-	        <field name="creatorid" type="I" size="19">
-	          <KEY/>
-	        </field>
-	        <field name="announcement" type="X">
-	        </field>
-	        <field name="title" type="C" size="255">
-	         </field>
-	        <field name="time" type="T">
-	        <DEFTIMESTAMP/>
-	        </field>
-	<opt>Type=InnoDB</opt> 
-	<index name="announcement_UK01">
+		<field name="creatorid" type="I" size="19">
+			<key />
+		</field>
+		<field name="announcement" type="X" />
+		<field name="title" type="C" size="255" />
+		<field name="time" type="T">
+			<deftimestamp />
+		</field>
+
+		<index name="announcement_creatorid_idx">
 			<col>creatorid</col>
 		</index>
-	</table>
-
-
-
-
-
-<table name="chat_users">
-	<field name="id" type="I" size="20">
-		<AUTOINCREMENT/>
-		<NOTNULL/>
-		<KEY/>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
+
+	<table name="chat_users">
+		<field name="id" type="I" size="20">
+			<autoincrement />
+			<notnull />
+			<key />
 		</field>
 		<field name="nick" type="C" size="50">
-			<NOTNULL/>
+			<notnull />
 		</field>
 		<field name="session" type="C" size="50">
-			<NOTNULL/>
+			<notnull />
 		</field>
 		<field name="ip" type="C" size="20">
-			<DEFAULT value="000.000.000.000"/>
-			<NOTNULL/>
+			<default value="000.000.000.000" />
+			<notnull />
 		</field>
 		<field name="ping" type="T">
-			<DEFAULT value="0000-00-00 00:00:00"/>
-		</field>
-
-		<opt>Type=InnoDB</opt> 
-		<index name="chat_users_IDX0">
+			<default value="NULL" />
+		</field>
+
+		<index name="chat_users_nick_idx">
 			<col>nick</col>
 		</index>
-		<opt>Type=InnoDB</opt> <index name="chat_users_IDX1">
+		<index name="chat_users_session_idx">
 			<col>session</col>
 		</index>
-		<index name="chat_users_IDX2">
+		<index name="chat_users_ping_idx">
 			<col>ping</col>
 		</index>
-	</table>
-
-
-
-
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="chat_msg">
 		<field name="id" type="I" size="20">
-			<AUTOINCREMENT/>
-			<NOTNULL/>
-			<KEY/>
+			<autoincrement />
+			<notnull />
+			<key />
 		</field>
 		<field name="chat_from" type="I" size="20">
-			<DEFAULT value="0"/>
-			<NOTNULL/>
+			<default value="0" />
+			<notnull />
+			<constraint>REFERENCES chat_users(id) ON DELETE CASCADE</constraint>
 		</field>
 		<field name="chat_to" type="I" size="20">
-			<DEFAULT value="0"/>
-			<NOTNULL/>
+			<default value="0" />
+			<notnull />
 		</field>
 		<field name="born" type="T">
-			<DEFAULT value="0000-00-00 00:00:00"/>
+			<default value="NULL" />
 		</field>
 		<field name="msg" type="C" size="255">
-			<NOTNULL/>
-		</field>
-
-		<opt>Type=InnoDB</opt>
-		<index name="chat_msg_IDX0">
+			<notnull />
+		</field>
+
+		<index name="chat_msg_chat_from_idx">
 			<col>chat_from</col>
 		</index>
-		<index name="chat_msg_IDX1">
+		<index name="chat_msg_chat_to_idx">
 			<col>chat_to</col>
 		</index>
-		<index name="chat_msg_IDX2">
+		<index name="chat_msg_born_idx">
 			<col>born</col>
 		</index>
-		<data>
-		</data>
-
-	</table>
-
-	<table name="chat_msg" alter="true">
-
-		<constraint>ADD CONSTRAINT `chat_msg_ibfk_1` FOREIGN KEY (`chat_from`) REFERENCES `chat_users` (`id`) ON DELETE CASCADE </constraint>
-		<opt>Type=InnoDB</opt>
-		<data>
-		</data>
-	</table>
-
-
-
-
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="chat_pchat">
 		<field name="id" type="I" size="20">
-			<AUTOINCREMENT/>
-			<NOTNULL/>
-			<KEY/>
+			<autoincrement />
+			<notnull />
+			<key />
 		</field>
 		<field name="msg" type="I" size="20">
-			<DEFAULT value="0"/>
-		</field>
-		<opt>Type=InnoDB</opt> <index name="chat_pchat_UK0">
-			<UNIQUE/>
+			<default value="0"/>
+			<constraint>REFERENCES chat_msg(id) ON DELETE CASCADE</constraint>
+		</field>
+
+		<index name="chat_pchat_msg_idx">
 			<col>msg</col>
-		</index>
-	</table>
-	<table name="chat_pchat" alter="true">
-
-		<constraint>ADD CONSTRAINT `chat_pchat_ibfk_1` FOREIGN KEY (`msg`) REFERENCES `chat_msg` (`id`) ON DELETE CASCADE </constraint>
-		<opt>Type=InnoDB</opt>
-		<data>
-		</data>
-	</table>
-
-
-
-
-
-
-
-
+			<unique />
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="chat_pvchat">
 		<field name="id" type="I" size="20">
-			<AUTOINCREMENT/>
-			<NOTNULL/>
-			<KEY/>
-	</field>
-	<field name="msg" type="I" size="20">
-		<DEFAULT value="0"/>
-	</field>
-	<opt>Type=InnoDB</opt><index name="chat_pvchat_UK0">
-		<UNIQUE/>
-		<col>msg</col>
-		</index>
-	</table>
-	<table name="chat_pvchat" alter="true">
-		<constraint>ADD CONSTRAINT `chat_pvchat_ibfk_1` FOREIGN KEY (`msg`) REFERENCES `chat_msg` (`id`) ON DELETE CASCADE</constraint>
-		<opt>Type=InnoDB</opt>
-		<data>
-	</data>
-</table>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+			<autoincrement />
+			<notnull />
+			<key />
+		</field>
+		<field name="msg" type="I" size="20">
+			<default value="0"/>
+			<constraint>REFERENCES chat_msg(id) ON DELETE CASCADE</constraint>
+		</field>
+		<index name="chat_pvchat_msg_idx">
+			<col>msg</col>
+			<unique />
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 	<table name="freetags">
 		<field name="id" type="I" size="19">
-			<NOTNULL/>
-			<KEY/>
-	</field>
-	<field name="tag" type="C" size="50">
-		<NOTNULL/>
-		<DEFAULT value=""/>
-	</field>
-	<field name="raw_tag" type="C" size="50">
-		<NOTNULL/>
-		<DEFAULT value=""/>
-	</field>
-	</table>
-	
+			<notnull />
+			<key />
+		</field>
+		<field name="tag" type="C" size="50">
+			<notnull />
+			<default value="" />
+		</field>
+		<field name="raw_tag" type="C" size="50">
+			<notnull />
+			<default value="" />
+		</field>
+	</table>
+
 	<table name="freetagged_objects">
-	<field name="tag_id" type="I" size="20">
-		<NOTNULL/>
-		<DEFAULT value="0"/>
-		<KEY/>
-	</field>
-	<field name="tagger_id" type="I" size="20">
-		<NOTNULL/>
-		<DEFAULT value="0"/>
-		<KEY/>
-	</field>
-	<field name="object_id" type="I" size="20">
-		<NOTNULL/>
-		<DEFAULT value="0"/>
-		<KEY/>
-	</field>
-	<field name="tagged_on" type="T">
-			<DEFAULT value="000.000.000.000"/>
-			<NOTNULL/>
-	</field>
-	<field name="module" type="C" size="50">
-			<DEFAULT value=""/>
-			<NOTNULL/>
-	</field>
-		<opt>Type=InnoDB</opt>
-		<index name="tag_id_index">
+		<field name="tag_id" type="I" size="20">
+			<notnull />
+			<default value="0" />
+			<key />
+		</field>
+		<field name="tagger_id" type="I" size="20">
+			<notnull />
+			<default value="0" />
+			<key />
+		</field>
+		<field name="object_id" type="I" size="20">
+			<notnull />
+			<default value="0" />
+			<key />
+		</field>
+		<field name="tagged_on" type="T">
+			<deftimestamp />
+			<notnull />
+		</field>
+		<field name="module" type="C" size="50">
+			<default value="" />
+			<notnull />
+		</field>
+
+		<index name="freetagged_objects_tag_id_tagger_id_object_id_idx">
 			<col>tag_id</col>
 			<col>tagger_id</col>
 			<col>object_id</col>
 		</index>
-
-	</table>
-
-
-
-
-
-
-
-
-
-
-	<table name="sogrouprelation" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_sogrouprelation78 FOREIGN KEY (salesorderid) REFERENCES salesorder(salesorderid) ON DELETE CASCADE</constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-	<table name="sogrouprelation" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_sogrouprelation2 FOREIGN KEY (groupname) REFERENCES groups(groupname) ON DELETE CASCADE</constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-	<table name="invoicegrouprelation" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_invoicegrouprelation2 FOREIGN KEY (groupname) REFERENCES groups(groupname) ON DELETE CASCADE</constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-	<table name="invoicegrouprelation" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_invoicegrouprelation234 FOREIGN KEY (invoiceid) REFERENCES invoice(invoiceid) ON DELETE CASCADE</constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
-
-
-	<table name="pogrouprelation" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_pogrouprelation123 FOREIGN KEY (purchaseorderid) REFERENCES purchaseorder(purchaseorderid) ON DELETE CASCADE</constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-	<table name="pogrouprelation" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_pogrouprelation2 FOREIGN KEY (groupname) REFERENCES groups(groupname) ON DELETE CASCADE</constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
-	<table name="quotegrouprelation" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_quotegrouprelation132 FOREIGN KEY (quoteid) REFERENCES quotes(quoteid) ON DELETE CASCADE</constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
-
-
-
-
-
-	<table name="quotegrouprelation" alter="true">
-		
-		<constraint>ADD CONSTRAINT fk_quotegrouprelation2 FOREIGN KEY (groupname) REFERENCES groups(groupname) ON DELETE CASCADE</constraint>
-		
-		<opt>Type=InnoDB</opt>
-		
-		<data>
-		</data>
-	</table>
-
-
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
 
 </schema>





More information about the vtigercrm-commits mailing list