[Vtigercrm-commits] [vtiger-commits] r10948 - in /vtigercrm/branches/5.0.3/modules/Migration: DBChanges/503rc2_to_503.php PatchApply.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Mon May 21 16:14:23 EDT 2007


Author: richie
Date: Mon May 21 14:14:18 2007
New Revision: 10948

Log:
* Fixed the migration issues

Modified:
    vtigercrm/branches/5.0.3/modules/Migration/DBChanges/503rc2_to_503.php
    vtigercrm/branches/5.0.3/modules/Migration/PatchApply.php

Modified: vtigercrm/branches/5.0.3/modules/Migration/DBChanges/503rc2_to_503.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Migration/DBChanges/503rc2_to_503.php (original)
+++ vtigercrm/branches/5.0.3/modules/Migration/DBChanges/503rc2_to_503.php Mon May 21 14:14:18 2007
@@ -99,7 +99,9 @@
 
 
 //Added for Custom Invoice Number, No need for security population
-ExecuteQuery("insert into vtiger_field values(23,".$adb->getUniqueID("vtiger_field").",'invoice_no','vtiger_invoice',1,'1','invoice_no','invoice_no',1,0,0,100,3,69,1,'V~M',1,NULL,'BAS')");
+$newfieldid = $conn->getUniqueID("vtiger_field");
+ExecuteQuery("insert into vtiger_field values(23,".$newfieldid.",'invoice_no','vtiger_invoice',1,'1','invoice_no','Invoice No',1,0,0,100,3,69,1,'V~M',1,NULL,'BAS')");
+populateFieldForSecurity('23',$newfieldid);
 
 ExecuteQuery("alter table vtiger_invoice add column (invoice_no varchar(50) UNIQUE default NULL)");
 
@@ -264,6 +266,15 @@
 ExecuteQuery("alter table vtiger_salesorder drop column salestax");
 ExecuteQuery("alter table vtiger_invoice drop column salestax");
 
+//Contact Name is not shown in Notes ListView because of cvcolumnlist entry as now we need lastname in the query result
+ExecuteQuery("update vtiger_cvcolumnlist set columnname='vtiger_contactdetails:lastname:lastname:Notes_Contact_Name:V' where columnname='vtiger_notes:contact_id:contact_id:Notes_Contact_Name:I'");
+
+//Missed Activity History entry in Potential related list has been added
+ExecuteQuery("insert into vtiger_relatedlists values(".$adb->getUniqueID('vtiger_relatedlists').",2,9,'get_history',8,'Activity History',0)");
+
+//Change the commission rate from decimal(3,3) to decimal(7,3) in products
+ExecuteQuery("alter table vtiger_products modify column commissionrate decimal(7,3)");
+
 
 
 

Modified: vtigercrm/branches/5.0.3/modules/Migration/PatchApply.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Migration/PatchApply.php (original)
+++ vtigercrm/branches/5.0.3/modules/Migration/PatchApply.php Mon May 21 14:14:18 2007
@@ -86,11 +86,20 @@
 	echo '<br></div>';
 	//echo "Failed Queries ==> <pre>";print_r($failure_query_array);echo '</pre>';
 }
-	
+
+
 //HANDLE HERE - Mickie
 //Here we have to update the version in table. so that when we do migration next time we will get the version
 global $adb, $vtiger_current_version;
-$adb->query("update vtiger_version set old_version='".$versions[$source_version]."',current_version='".$vtiger_current_version."'");
+$res = $adb->query("select * from vtiger_version");
+if($adb->num_rows($res))
+{
+	$res = $adb->query("update vtiger_version set old_version='".$versions[$source_version]."',current_version='".$vtiger_current_version."'");
+}
+else
+{
+	$adb->query("insert into vtiger_version (id, old_version, current_version) values ('','".$versions[$source_version]."','".$vtiger_current_version."')");
+}
 
 
 





More information about the vtigercrm-commits mailing list