[Vtigercrm-commits] [vtiger-commits] r5807 - in /vtigercrm/branches/5.0_postgresql_integration: data/ include/ include/utils/ install/ modules/Reports/ modules/Users/ schema/

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Tue May 9 21:18:42 EDT 2006


Author: allanbush
Date: Tue May  9 19:18:27 2006
New Revision: 5807

Log:
Ref #752.  Table creation and nearly all the demo data population is working (one issue with the creation of helpdesk tickets still).

Modified:
    vtigercrm/branches/5.0_postgresql_integration/data/CRMEntity.php
    vtigercrm/branches/5.0_postgresql_integration/include/PopulateComboValues.php
    vtigercrm/branches/5.0_postgresql_integration/include/utils/CommonUtils.php
    vtigercrm/branches/5.0_postgresql_integration/include/utils/utils.php
    vtigercrm/branches/5.0_postgresql_integration/install/2setConfig.php
    vtigercrm/branches/5.0_postgresql_integration/install/5createTables.inc.php
    vtigercrm/branches/5.0_postgresql_integration/install/populateSeedData.php
    vtigercrm/branches/5.0_postgresql_integration/modules/Reports/PopulateReports.php
    vtigercrm/branches/5.0_postgresql_integration/modules/Users/LoginHistory.php
    vtigercrm/branches/5.0_postgresql_integration/modules/Users/Security.php
    vtigercrm/branches/5.0_postgresql_integration/schema/DatabaseSchema.xml

Modified: vtigercrm/branches/5.0_postgresql_integration/data/CRMEntity.php
==============================================================================
--- vtigercrm/branches/5.0_postgresql_integration/data/CRMEntity.php (original)
+++ vtigercrm/branches/5.0_postgresql_integration/data/CRMEntity.php Tue May  9 19:18:27 2006
@@ -89,6 +89,9 @@
 
 				if($_REQUEST['module'] != 'Emails')
 				{
+					if(!$parentid) {
+						$parentid = $adb->getUniqueID('seactivityrel');
+					}
 					$mysql='insert into seactivityrel values('.$parentid.','.$actid.')';
 					$adb->query($mysql);
 				}
@@ -382,7 +385,7 @@
 		else
 		{
 			$description_val = from_html($adb->formatString("crmentity","description",$this->column_fields['description']),($insertion_mode == 'edit')?true:false);
-			$sql = "insert into crmentity (crmid,smcreatorid,smownerid,setype,description,createdtime,modifiedtime) values('".$current_id."','".$current_user->id."','".$ownerid."','".$module."',".$description_val.",'".$date_var."','".$date_var."')";
+			$sql = "insert into crmentity (crmid,smcreatorid,smownerid,setype,description,createdtime,modifiedtime) values('".$current_id."','".$current_user->id."','".$ownerid."','".$module."',".$description_val.",".$adb->formatDate($date_var).",".$adb->formatDate($date_var).")";
 			$adb->query($sql);
 			$this->id = $current_id;
 		}

Modified: vtigercrm/branches/5.0_postgresql_integration/include/PopulateComboValues.php
==============================================================================
--- vtigercrm/branches/5.0_postgresql_integration/include/PopulateComboValues.php (original)
+++ vtigercrm/branches/5.0_postgresql_integration/include/PopulateComboValues.php Tue May  9 19:18:27 2006
@@ -26,13 +26,14 @@
 		$i=0;
 		foreach ($values as $val => $cal)
 		{
+			$id = $adb->getUniqueID($tableName);
 			if($val != '')
 			{
-				$adb->query("insert into ".$tableName. " values(null,'".$val."',".$i.",1)");
+				$adb->query("insert into ".$tableName. " values(".$id.",'".$val."',".$i.",1)");
 			}
 			else
 			{
-				$adb->query("insert into ".$tableName. " values(null,'--None--',".$i.",1)");
+				$adb->query("insert into ".$tableName. " values(".$id.",'--None--',".$i.",1)");
 			}
 			$i++;
 		}

Modified: vtigercrm/branches/5.0_postgresql_integration/include/utils/CommonUtils.php
==============================================================================
--- vtigercrm/branches/5.0_postgresql_integration/include/utils/CommonUtils.php (original)
+++ vtigercrm/branches/5.0_postgresql_integration/include/utils/CommonUtils.php Tue May  9 19:18:27 2006
@@ -1681,7 +1681,7 @@
 			 'Contacts'=>'LNK_NEW_CONTACT',
 			 'Vendors'=>'LNK_NEW_VENDOR'); 	
 
-$qc_query = "select distinct tablabel,tab.name from field inner join tab on tab.tabid = field.tabid where quickcreate=0 order by tab.tablabel";
+$qc_query = "select distinct tab.tablabel,tab.name from field inner join tab on tab.tabid = field.tabid where quickcreate=0 order by tab.tablabel";
 $result = $adb->query($qc_query);
 $noofrows = $adb->num_rows($result);
 $qcmodule_array = Array();

Modified: vtigercrm/branches/5.0_postgresql_integration/include/utils/utils.php
==============================================================================
--- vtigercrm/branches/5.0_postgresql_integration/include/utils/utils.php (original)
+++ vtigercrm/branches/5.0_postgresql_integration/include/utils/utils.php Tue May  9 19:18:27 2006
@@ -1198,7 +1198,11 @@
 		list($y,$m,$d) = split('-',$value);
 	}
 		
-	$insert_date=$y.'-'.$m.'-'.$d;
+	if(!$y && !$m && !$d) {
+		$insert_date = '';
+	} else {
+		$insert_date=$y.'-'.$m.'-'.$d;
+	}
 	$log->debug("Exiting getDBInsertDateValue method ...");
 	return $insert_date;
 }

Modified: vtigercrm/branches/5.0_postgresql_integration/install/2setConfig.php
==============================================================================
--- vtigercrm/branches/5.0_postgresql_integration/install/2setConfig.php (original)
+++ vtigercrm/branches/5.0_postgresql_integration/install/2setConfig.php Tue May  9 19:18:27 2006
@@ -138,6 +138,15 @@
 		!isset($_REQUEST['mail_server_username']) ? $mail_server_username = $mail_server_username : $mail_server_username = stripslashes($_REQUEST['mail_server_username']);
 		!isset($_REQUEST['mail_server_password']) ? $mail_server_password = $mail_server_password : $mail_server_password = stripslashes($_REQUEST['mail_server_password']);
 		!isset($_REQUEST['admin_email']) ? $admin_email = "" : $admin_email = $_REQUEST['admin_email'];
+		}
+
+		// determine database options
+		$db_options = array();
+		if(function_exists('mysql_connect')) {
+			$db_options['mysql'] = 'MySQL';
+		}
+		if(function_exists('pg_connect')) {
+			$db_options['pgsql'] = 'Postgres';
 		}
 ?>
 
@@ -293,9 +302,19 @@
 			<tr><td colspan=2><strong>Database Configuration</strong></td></tr>
 			<tr>
                <td width="25%" nowrap bgcolor="#F5F5F5" ><strong>Database Type</strong> <sup><font color=red>*</font></sup></td>
-               <td width="75%" bgcolor="white" align="left"><select name="dbtype">
-			   <option value="mysql" selected="selected">MySQL</option>
-			   </select>
+               <td width="75%" bgcolor="white" align="left">
+		<?php if(!$db_options) : ?>
+			No Database Support Deteched
+		<?php elseif(count($db_options) == 1) : ?>
+			<?php list($dbtype, $label) = each($db_options); ?>
+			<input type="hidden" name="dbtype" value="<?php echo $dbtype ?>"><?php echo $label ?>
+		<?php else : ?>
+			<select name="dbtype">
+			<?php foreach($db_options as $dbtype => $label) : ?>
+				<option value="<?php echo $dbtype ?>"><?php echo $label ?></option>
+			<?php endforeach ?>
+			</select>
+		<?php endif ?>
 			   </td>
             </tr>
 			<tr>

Modified: vtigercrm/branches/5.0_postgresql_integration/install/5createTables.inc.php
==============================================================================
--- vtigercrm/branches/5.0_postgresql_integration/install/5createTables.inc.php (original)
+++ vtigercrm/branches/5.0_postgresql_integration/install/5createTables.inc.php Tue May  9 19:18:27 2006
@@ -213,6 +213,11 @@
 create_tab_data_file();
 create_parenttab_data_file();
 
+// ensure required sequences are created (adodb creates them as needed, but if
+// creation occurs within a transaction we get problems
+$db->getUniqueID("crmentity");
+$db->getUniqueID("seactivityrel");
+
 // populate the db with seed data
 if ($db_populate) {
         eecho ("Populate seed data into $db_name");

Modified: vtigercrm/branches/5.0_postgresql_integration/install/populateSeedData.php
==============================================================================
--- vtigercrm/branches/5.0_postgresql_integration/install/populateSeedData.php (original)
+++ vtigercrm/branches/5.0_postgresql_integration/install/populateSeedData.php Tue May  9 19:18:27 2006
@@ -81,9 +81,9 @@
 {
 	$date = "";
 	$date .= "2006";
-	$date .= "/";
+	$date .= "-";
 	$date .= rand(1,9);
-	$date .= "/";
+	$date .= "-";
 	$date .= rand(1,28);
 	
 	return $date;
@@ -758,7 +758,6 @@
 	//$rand_key = array_rand($s);$contact_key = array_rand($contact_ids);
         $notes->column_fields["contact_id"] 	= 	$contact_ids[$contact_key];
 	$helpdesk->column_fields["ticket_title"]	= $ticket_title_array[$i];
-	
         $helpdesk->column_fields["assigned_user_id"] = $assigned_user_id;
 	
 	$helpdesk->save("HelpDesk");
@@ -779,7 +778,7 @@
 	$rand_num=array_rand($num_array);
 
 	$rand_date = & create_date();
-	$en=explode("/",$rand_date);
+	$en=explode("-",$rand_date);
 	if($en[1]<10)
 		$en[1]="0".$en[1];
 	if($en[2]<10)
@@ -847,7 +846,7 @@
 }
 
 
-$adb->query("update crmentity set crmentity.smcreatorid=".$assigned_user_id);
+$adb->query("update crmentity set smcreatorid=".$assigned_user_id);
 
 $expected_revenue = Array("250000","750000","500000");
 $budget_cost = Array("25000","50000","90000");

Modified: vtigercrm/branches/5.0_postgresql_integration/modules/Reports/PopulateReports.php
==============================================================================
--- vtigercrm/branches/5.0_postgresql_integration/modules/Reports/PopulateReports.php (original)
+++ vtigercrm/branches/5.0_postgresql_integration/modules/Reports/PopulateReports.php Tue May  9 19:18:27 2006
@@ -417,8 +417,8 @@
 {
 	global $adb;
 	$sql = "INSERT INTO reportfolder ";
-	$sql .= "(FOLDERID,FOLDERNAME,DESCRIPTION,STATE) ";
-	$sql .= "VALUES (null,'".$fldrname."','".$fldrdescription."','SAVED')";
+	$sql .= "(FOLDERNAME,DESCRIPTION,STATE) ";
+	$sql .= "VALUES ('".$fldrname."','".$fldrdescription."','SAVED')";
 	$result = $adb->query($sql);
 }
 

Modified: vtigercrm/branches/5.0_postgresql_integration/modules/Users/LoginHistory.php
==============================================================================
--- vtigercrm/branches/5.0_postgresql_integration/modules/Users/LoginHistory.php (original)
+++ vtigercrm/branches/5.0_postgresql_integration/modules/Users/LoginHistory.php Tue May  9 19:18:27 2006
@@ -60,7 +60,7 @@
 	/** Records the Login info */
 	function user_login(&$usname,&$usip,&$intime)
 	{
-		$query = "Insert into loginhistory values (null,'$usname','$usip',null,".$this->db->formatDate($intime).",'Signedin')";
+		$query = "Insert into loginhistory (user_name, user_ip, logout_time, login_time, status) values ('$usname','$usip',null,".$this->db->formatDate($intime).",'Signedin')";
 		$result = $this->db->query($query)
                         or die("MySQL error: ".mysql_error());
 		

Modified: vtigercrm/branches/5.0_postgresql_integration/modules/Users/Security.php
==============================================================================
--- vtigercrm/branches/5.0_postgresql_integration/modules/Users/Security.php (original)
+++ vtigercrm/branches/5.0_postgresql_integration/modules/Users/Security.php Tue May  9 19:18:27 2006
@@ -2062,56 +2062,51 @@
 		$this->db->query("insert into moduleowners values(".getTabid($mod).",1)");
 	}
 	//added by jeri for category view from db
-	$this->db->query("insert into parenttab values
-			(1,'My Home Page',1,0),
-			(2,'Marketing',2,0),
-			(3,'Sales',3,0),
-			(4,'Support',4,0),
-			(5,'Analytics',5,0),
-			(6,'Inventory',6,0),
-			(7,'Tools',7,0),
-			(8,'Settings',8,0)
-		    	");
-
-	$this->db->query("insert into parenttabrel values
-			(1,9,2),
-			(1,17,3),
-			(1,10,4),
-    			(1,3,1),
-		    	(3,7,1),
-			(3,6,2),
-			(3,4,3),
-    			(3,2,4),
-	    		(3,20,5),
-	    		(3,22,6),
-	    		(3,23,7),
-	    		(3,14,8),
-	    		(3,19,9),
-	    		(3,8,10),
-	   		(4,13,1),
-	    		(4,15,2),
-	    		(4,6,3),
-	    		(4,4,4),
-		   	(4,14,5),
-			(4,8,6),
-			(5,1,1),
-			(5,25,2),
-		    	(6,14,1),
-	 	   	(6,18,2),
-		    	(6,19,3),
-		    	(6,21,4),
-		    	(6,22,5),
-		    	(6,20,6),
-	    		(6,23,7),
-		    	(7,24,1),
-			(7,27,2),
-	    		(7,8,3),
-		    	(2,26,1),
-		    	(2,6,2),
-		    	(2,4,3)");
-				
-
-		}
-	
+	$this->db->query("insert into parenttab values (1,'My Home Page',1,0)");
+	$this->db->query("insert into parenttab values (2,'Marketing',2,0)");
+	$this->db->query("insert into parenttab values (3,'Sales',3,0)");
+	$this->db->query("insert into parenttab values (4,'Support',4,0)");
+	$this->db->query("insert into parenttab values (5,'Analytics',5,0)");
+	$this->db->query("insert into parenttab values (6,'Inventory',6,0)");
+	$this->db->query("insert into parenttab values (7,'Tools',7,0)");
+	$this->db->query("insert into parenttab values (8,'Settings',8,0)");
+
+	$this->db->query("insert into parenttabrel values (1,9,2)");
+	$this->db->query("insert into parenttabrel values (1,17,3)");
+	$this->db->query("insert into parenttabrel values (1,10,4)");
+	$this->db->query("insert into parenttabrel values (1,3,1)");
+	$this->db->query("insert into parenttabrel values (3,7,1)");
+	$this->db->query("insert into parenttabrel values (3,6,2)");
+	$this->db->query("insert into parenttabrel values (3,4,3)");
+	$this->db->query("insert into parenttabrel values (3,2,4)");
+	$this->db->query("insert into parenttabrel values (3,20,5)");
+	$this->db->query("insert into parenttabrel values (3,22,6)");
+	$this->db->query("insert into parenttabrel values (3,23,7)");
+	$this->db->query("insert into parenttabrel values (3,14,8)");
+	$this->db->query("insert into parenttabrel values (3,19,9)");
+	$this->db->query("insert into parenttabrel values (3,8,10)");
+	$this->db->query("insert into parenttabrel values (4,13,1)");
+	$this->db->query("insert into parenttabrel values (4,15,2)");
+	$this->db->query("insert into parenttabrel values (4,6,3)");
+	$this->db->query("insert into parenttabrel values (4,4,4)");
+	$this->db->query("insert into parenttabrel values (4,14,5)");
+	$this->db->query("insert into parenttabrel values (4,8,6)");
+	$this->db->query("insert into parenttabrel values (5,1,1)");
+	$this->db->query("insert into parenttabrel values (5,25,2)");
+	$this->db->query("insert into parenttabrel values (6,14,1)");
+	$this->db->query("insert into parenttabrel values (6,18,2)");
+	$this->db->query("insert into parenttabrel values (6,19,3)");
+	$this->db->query("insert into parenttabrel values (6,21,4)");
+	$this->db->query("insert into parenttabrel values (6,22,5)");
+	$this->db->query("insert into parenttabrel values (6,20,6)");
+	$this->db->query("insert into parenttabrel values (6,23,7)");
+	$this->db->query("insert into parenttabrel values (7,24,1)");
+	$this->db->query("insert into parenttabrel values (7,27,2)");
+	$this->db->query("insert into parenttabrel values (7,8,3)");
+	$this->db->query("insert into parenttabrel values (2,26,1)");
+	$this->db->query("insert into parenttabrel values (2,6,2)");
+	$this->db->query("insert into parenttabrel values (2,4,3)");
+	
+	}
 }
 ?>

Modified: vtigercrm/branches/5.0_postgresql_integration/schema/DatabaseSchema.xml
==============================================================================
--- vtigercrm/branches/5.0_postgresql_integration/schema/DatabaseSchema.xml (original)
+++ vtigercrm/branches/5.0_postgresql_integration/schema/DatabaseSchema.xml Tue May  9 19:18:27 2006
@@ -752,9 +752,7 @@
 			<notnull />
 		</field>
 		<field name="due_date" type="D" />
-		<field name="time_start" type="C" size="50">
-			<notnull />
-		</field>
+		<field name="time_start" type="C" size="50" />
 		<field name="sendnotification" type="C" size="3">
 			<notnull />
 			<default value="0"/>
@@ -771,6 +769,7 @@
 		</field>
 		<field name="visibility" type="C" size="50">
 			<notnull />
+			<default value="all" />
 		</field>
 
 		<index name="activity_activityid_subject_idx">
@@ -1730,53 +1729,6 @@
 		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
-	<table name="sogrouprelation">
-		<field name="salesorderid" type="I" size="19">
-			<key />
-			<constraint>REFERENCES salesorder(salesorderid) ON DELETE CASCADE</constraint>
-		</field>
-		<field name="groupname" type="C" size="100">
-			<constraint>REFERENCES groups(groupname) ON DELETE CASCADE</constraint>
-		</field>
-
-		<index name="sogrouprelation_groupname_idx">
-			<col>groupname</col>
-		</index>
-		<opt platform="mysql">Type=InnoDB</opt>
-	</table>
-
-	<table name="invoicegrouprelation">
-		<field name="invoiceid" type="I" size="19">
-			<key />
-			<constraint>REFERENCES invoice(invoiceid) ON DELETE CASCADE</constraint>
-		</field>
-		<field name="groupname" type="C" size="100">
-			<constraint>REFERENCES groups(groupname) ON DELETE CASCADE</constraint>
-		</field>
-
-		<index name="invoicegrouprelation_groupname_invoiceid_idx">
-			<col>groupname</col>
-			<col>invoiceid</col>
-		</index>
-		<opt platform="mysql">Type=InnoDB</opt>
-	</table>
-
-	<table name="pogrouprelation">
-		<field name="purchaseorderid" type="I" size="19">
-			<key />
-			<constraint>REFERENCES purchaseorder(purchaseorderid) ON DELETE CASCADE</constraint>
-		</field>
-		<field name="groupname" type="C" size="100">
-			<constraint>REFERENCES groups(groupname) ON DELETE CASCADE</constraint>
-		</field>
-
-		<index name="pogrouprelation_groupname_purchaseorderid_idx">
-			<col>groupname</col>
-			<col>purchaseorderid</col>
-		</index>
-		<opt platform="mysql">Type=InnoDB</opt>
-	</table>
-
 	<table name="activitygrouprelation">
 		<field name="activityid" type="I" size="19">
 			<key />
@@ -2738,6 +2690,115 @@
 		</field>
 	</table>
 
+	<table name="activsubtype">
+		<field name="activesubtypeid" type="I" size="19">
+			<key />
+			<autoincrement />
+		</field>
+		<field name="activsubtype" type="C" size="100" />
+		<field name="sortorderid" type="I" size="19">
+			<notnull />
+			<default value="0" />
+		</field>
+		<field name="presence" type="I" size="1">
+			<notnull />
+			<default value="1" />
+		</field>
+	</table>
+
+	<table name="downloadpurpose">
+		<field name="downloadpurposeid" type="I" size="19">
+			<key />
+			<autoincrement />
+		</field>
+		<field name="purpose" type="C" size="200">
+			<notnull />
+		</field>
+		<field name="sortorderid" type="I" size="19">
+			<notnull />
+			<default value="0" />
+		</field>
+		<field name="presence" type="I" size="1">
+			<notnull />
+			<default value="1" />
+		</field>
+
+		<index name="downloadpurpose_purpose_idx">
+			<col>purpose</col>
+			<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 name="sortorderid" type="I" size="19">
+			<notnull />
+			<default value="0" />
+		</field>
+		<field name="presence" type="I" size="1">
+			<notnull />
+			<default value="1" />
+		</field>
+	</table>
+
+	<table name="durationmins">
+		<field name="minsid" type="I" size="19">
+			<key />
+			<autoincrement />
+		</field>
+		<field name="mins" type="C" size="50" />
+		<field name="sortorderid" type="I" size="19">
+			<notnull />
+			<default value="0" />
+		</field>
+		<field name="presence" type="I" size="1">
+			<notnull />
+			<default value="1" />
+		</field>
+	</table>
+
+	<table name="evaluationstatus">
+		<field name="evalstatusid" type="I" size="19">
+			<key />
+			<autoincrement />
+		</field>
+		<field name="status" type="C" size="200">
+			<notnull />
+		</field>
+		<field name="sortorderid" type="I" size="19">
+			<notnull />
+			<default value="0" />
+		</field>
+		<field name="presence" type="I" size="1">
+			<notnull />
+			<default value="1" />
+		</field>
+
+		<index name="evaluationstatus_status_idx">
+			<col>status</col>
+			<unique />
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
+
+	<table name="profile">
+		<field name="profileid" type="I" size="10">
+			<key />
+			<autoincrement />
+		</field>
+		<field name="profilename" type="C" size="50">
+			<notnull />
+		</field>
+		<field name="description" type="X" />
+
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
+
 	<table name="profile2globalpermissions">
 		<field name="profileid" type="I" size="19">
 			<key />
@@ -2752,115 +2813,6 @@
 			<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 name="sortorderid" type="I" size="19">
-			<notnull />
-			<default value="0" />
-		</field>
-		<field name="presence" type="I" size="1">
-			<notnull />
-			<default value="1" />
-		</field>
-	</table>
-
-	<table name="downloadpurpose">
-		<field name="downloadpurposeid" type="I" size="19">
-			<key />
-			<autoincrement />
-		</field>
-		<field name="purpose" type="C" size="200">
-			<notnull />
-		</field>
-		<field name="sortorderid" type="I" size="19">
-			<notnull />
-			<default value="0" />
-		</field>
-		<field name="presence" type="I" size="1">
-			<notnull />
-			<default value="1" />
-		</field>
-
-		<index name="downloadpurpose_purpose_idx">
-			<col>purpose</col>
-			<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 name="sortorderid" type="I" size="19">
-			<notnull />
-			<default value="0" />
-		</field>
-		<field name="presence" type="I" size="1">
-			<notnull />
-			<default value="1" />
-		</field>
-	</table>
-
-	<table name="durationmins">
-		<field name="minsid" type="I" size="19">
-			<key />
-			<autoincrement />
-		</field>
-		<field name="mins" type="C" size="50" />
-		<field name="sortorderid" type="I" size="19">
-			<notnull />
-			<default value="0" />
-		</field>
-		<field name="presence" type="I" size="1">
-			<notnull />
-			<default value="1" />
-		</field>
-	</table>
-
-	<table name="evaluationstatus">
-		<field name="evalstatusid" type="I" size="19">
-			<key />
-			<autoincrement />
-		</field>
-		<field name="status" type="C" size="200">
-			<notnull />
-		</field>
-		<field name="sortorderid" type="I" size="19">
-			<notnull />
-			<default value="0" />
-		</field>
-		<field name="presence" type="I" size="1">
-			<notnull />
-			<default value="1" />
-		</field>
-
-		<index name="evaluationstatus_status_idx">
-			<col>status</col>
-			<unique />
-		</index>
-		<opt platform="mysql">Type=InnoDB</opt>
-	</table>
-
-	<table name="profile">
-		<field name="profileid" type="I" size="10">
-			<key />
-			<autoincrement />
-		</field>
-		<field name="profilename" type="C" size="50">
-			<notnull />
-		</field>
-		<field name="description" type="X" />
-
 		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
@@ -2940,9 +2892,7 @@
 		<field name="share_action_id" type="I" size="19">
 			<key />
 		</field>
-		<field name="share_action_name" type="C" size="200">
-			<key />
-		</field>
+		<field name="share_action_name" type="C" size="200" />
 
 		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
@@ -3067,6 +3017,21 @@
 		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
+	<table name="sogrouprelation">
+		<field name="salesorderid" type="I" size="19">
+			<key />
+			<constraint>REFERENCES salesorder(salesorderid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="groupname" type="C" size="100">
+			<constraint>REFERENCES groups(groupname) ON DELETE CASCADE</constraint>
+		</field>
+
+		<index name="sogrouprelation_groupname_idx">
+			<col>groupname</col>
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
+
 	<table name="sobillads">
 		<field name="sobilladdressid" type="I" size="19">
 			<key />
@@ -3471,6 +3436,22 @@
 		</index>
 		<index name="purchaseorder_contactid_idx">
 			<col>contactid</col>
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
+
+	<table name="pogrouprelation">
+		<field name="purchaseorderid" type="I" size="19">
+			<key />
+			<constraint>REFERENCES purchaseorder(purchaseorderid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="groupname" type="C" size="100">
+			<constraint>REFERENCES groups(groupname) ON DELETE CASCADE</constraint>
+		</field>
+
+		<index name="pogrouprelation_groupname_purchaseorderid_idx">
+			<col>groupname</col>
+			<col>purchaseorderid</col>
 		</index>
 		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
@@ -3574,6 +3555,22 @@
 		<opt platform="mysql">Type=InnoDB</opt>
 	</table>
 
+	<table name="invoicegrouprelation">
+		<field name="invoiceid" type="I" size="19">
+			<key />
+			<constraint>REFERENCES invoice(invoiceid) ON DELETE CASCADE</constraint>
+		</field>
+		<field name="groupname" type="C" size="100">
+			<constraint>REFERENCES groups(groupname) ON DELETE CASCADE</constraint>
+		</field>
+
+		<index name="invoicegrouprelation_groupname_invoiceid_idx">
+			<col>groupname</col>
+			<col>invoiceid</col>
+		</index>
+		<opt platform="mysql">Type=InnoDB</opt>
+	</table>
+
 	<table name="invoicebillads">
 		<field name="invoicebilladdressid" type="I" size="19">
 			<key />





More information about the vtigercrm-commits mailing list