[Vtigercrm-commits] [vtiger-commits] r10798 - /vtigercrm/branches/5.0.3/modules/Migration/DBChanges/503rc2_to_503.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Fri Apr 27 07:40:08 EDT 2007


Author: richie
Date: Fri Apr 27 05:40:02 2007
New Revision: 10798

Log:
* Added new database changes. ticket 3668 change is added once again which is already exist, anyway we have added again, #3668

Modified:
    vtigercrm/branches/5.0.3/modules/Migration/DBChanges/503rc2_to_503.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 Fri Apr 27 05:40:02 2007
@@ -97,6 +97,98 @@
 	ExecuteQuery($query);
 }
 
+
+//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')");
+
+ExecuteQuery("alter table vtiger_invoice add column (invoice_no varchar(50) UNIQUE default NULL)");
+
+$res = $adb->query("select cvid from vtiger_customview where entitytype='Invoice' and viewname='All'");
+$cvid = $adb->query_result($res,0,'cvid');
+
+ExecuteQuery("update vtiger_cvcolumnlist set columnindex=6 where columnindex=5 and cvid=$cvid");
+ExecuteQuery("update vtiger_cvcolumnlist set columnindex=5 where columnindex=4 and cvid=$cvid");
+ExecuteQuery("update vtiger_cvcolumnlist set columnindex=4 where columnindex=3 and cvid=$cvid");
+ExecuteQuery("update vtiger_cvcolumnlist set columnindex=3 where columnindex=2 and cvid=$cvid");
+ExecuteQuery("update vtiger_cvcolumnlist set columnindex=2 where columnindex=1 and cvid=$cvid");
+ExecuteQuery("insert into vtiger_cvcolumnlist values($cvid,1,'vtiger_invoice:invoice_no:invoice_no:Invoice_invoice_no:V')");
+
+//Added for product custom view taxclass issue Ticket #3364 
+ExecuteQuery("update vtiger_field set tablename='vtiger_products' where tablename='vtiger_producttaxrel' and columnname='taxclass'");
+ExecuteQuery("update vtiger_cvcolumnlist set columnname='vtiger_products:taxclass:taxclass:Products_Tax_Class:V' where columnname='vtiger_producttaxrel:taxclass:taxclass:Products_Tax_Class:V'");
+
+
+
+
+//Display type 3 added in profile & default org tables
+
+$profileresult = $adb->query("select * from vtiger_profile");
+$countprofiles = $adb->num_rows($profileresult);
+
+$res = $adb->query("select * from vtiger_field where generatedtype=1 and displaytype=3 and tabid!=29");
+$num_fields = $adb->num_rows($res);
+for($i=0;$i<$num_fields;$i++)
+{
+	$tabid = $adb->query_result($res,$i,'tabid');
+	$fieldid = $adb->query_result($res,$i,'fieldid');
+
+	//For each profile, we have to enter the current fields
+	for ($j=0;$j<$countprofiles;$j++)
+	{
+        	$profileid = $adb->query_result($profileresult,$j,'profileid');
+	        ExecuteQuery('insert into vtiger_profile2field values ('.$profileid.','.$tabid.','.$fieldid.',0,1)');
+	}
+	
+	$def_query = "insert into vtiger_def_org_field values (".$tabid.",".$fieldid.",0,1)";
+	ExecuteQuery($def_query);
+}
+
+
+$query_array2 = Array(
+	
+			//Added To fix Duplicate items in Report's Select Column(ticket #3665)
+
+			"update vtiger_field set fieldlabel='Adjustment' where tabid=22 and columnname='adjustment'",
+
+			"update vtiger_field set fieldlabel='Subtotal' where tabid=22 and columnname='subtotal'",
+
+			"update vtiger_field set fieldlabel='Adjustment' where tabid=23 and columnname='adjustment'",
+
+			"update vtiger_field set fieldlabel='Salestax' where tabid=20 and columnname='tax'",
+
+			// Changes made to make discontinued column in vtiger_products '0' during deactivation.
+
+			"alter table vtiger_products modify discontinued int(1) NOT NULL default 0",
+
+
+			//Ref : ticket#3278, 3309, 3461
+			"update vtiger_field set typeofdata='E~O' where fieldname in ('yahooid','yahoo_id')",
+			"alter table vtiger_leaddetails modify noofemployees int(50)",
+			"update vtiger_field set typeofdata='I~O' where fieldname ='noofemployees' && tabid='7'",
+
+			//Ref : ticket#3521
+			"update vtiger_field set typeofdata ='D~O' where tabid=21 && fieldname='duedate'",
+
+
+			//Changes made to add an email Id for standarduser since a user must have an Email Id.Changes for 5.0.3.
+			"update vtiger_users set email1='standarduser at vtigeruser.com' where id = '2' and email1 = ''",
+
+
+			//#3668, this query is already available in the file modules/Migration/DBChanges/42P2_to_50.php
+			"update vtiger_crmentity set setype='Calendar' where setype='Activities'",
+
+			//we don't have field security for Emails module, so we can delete the existing entries
+			"delete from vtiger_profile2field where tabid=10",
+			"delete from vtiger_def_org_field where tabid=10",
+		     );
+
+foreach($query_array2 as $query)
+{
+	ExecuteQuery($query);
+}
+
+
+
 $migrationlog->debug("\n\nDB Changes from 5.0.3RC2 to 5.0.3 -------- Ends \n\n");
 
 





More information about the vtigercrm-commits mailing list