[Vtigercrm-commits] [vtiger-commits] r9740 - in /vtigercrm/branches/5.0.2/modules/Migration: 502DBChanges.php ModifyDatabase/42P2_to_50.php ModifyDatabase/deleteCustomFields.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Sun Oct 29 13:50:23 EST 2006


Author: richie
Date: Sun Oct 29 11:50:16 2006
New Revision: 9740

Log:
file added and modifed for 502 db changes

Added:
    vtigercrm/branches/5.0.2/modules/Migration/502DBChanges.php
    vtigercrm/branches/5.0.2/modules/Migration/ModifyDatabase/deleteCustomFields.php   (with props)
Modified:
    vtigercrm/branches/5.0.2/modules/Migration/ModifyDatabase/42P2_to_50.php

Modified: vtigercrm/branches/5.0.2/modules/Migration/ModifyDatabase/42P2_to_50.php
==============================================================================
--- vtigercrm/branches/5.0.2/modules/Migration/ModifyDatabase/42P2_to_50.php (original)
+++ vtigercrm/branches/5.0.2/modules/Migration/ModifyDatabase/42P2_to_50.php Sun Oct 29 11:50:16 2006
@@ -3766,6 +3766,59 @@
 	}
 }
 
+//Added after 5.0.1
+//we have to delete the entries from customview and report related tables for deleted customfields
+include("modules/Migration/ModifyDatabase/deleteCustomFields.php");
+
+//5.0.2 database changes - added on 27-10-06
+
+//Query added to show Manufacturer field in Products module
+Execute("update vtiger_field set displaytype=1,block=31 where tabid=14 and block=1");
+Execute("update vtiger_field set block=23,displaytype=1 where block=1 and displaytype=23 and tabid=10");
+Execute("update vtiger_field set block=22,displaytype=1 where block=1 and displaytype=22 and tabid=10");
+
+//Added to rearange the attachment in HelpDesk
+Execute(" update vtiger_field set block=25,sequence=12 where tabid=13 and fieldname='filename'");
+
+//Query added to as entityname,its tablename,its primarykey are saved in a table
+Execute(" CREATE TABLE `vtiger_entityname` (
+	`tabid` int(19) NOT NULL default '0',
+	`modulename` varchar(50) NOT NULL,
+	`tablename` varchar(50) NOT NULL,
+	`fieldname` varchar(150) NOT NULL,
+	`entityidfield` varchar(150) NOT NULL,
+	PRIMARY KEY (`tabid`),
+	KEY `entityname_tabid_idx` (`tabid`)
+)");
+
+//Data Populated for the existing modules
+Execute("insert into vtiger_entityname values(7,'Leads','vtiger_leaddetails','lastname,firstname','leadid')");
+Execute("insert into vtiger_entityname values(6,'Accounts','vtiger_account','accountname','accountid')");
+Execute("insert into vtiger_entityname values(4,'Contacts','vtiger_contactdetails','lastname,firstname','contactid')");
+Execute("insert into vtiger_entityname values(2,'Potentials','vtiger_potential','potentialname','potentialid')");
+Execute("insert into vtiger_entityname values(8,'Notes','vtiger_notes','title','notesid')");
+Execute("insert into vtiger_entityname values(13,'HelpDesk','vtiger_troubletickets','title','ticketid')");
+Execute("insert into vtiger_entityname values(9,'Calendar','vtiger_activity','subject','activityid')");
+Execute("insert into vtiger_entityname values(10,'Emails','vtiger_activity','subject','activityid')");
+Execute("insert into vtiger_entityname values(14,'Products','vtiger_products','productname','productid')");
+Execute("insert into vtiger_entityname values(29,'Users','vtiger_users','last_name,first_name','id')");
+Execute("insert into vtiger_entityname values(23,'Invoice','vtiger_invoice','subject','invoiceid')");
+Execute("insert into vtiger_entityname values(20,'Quotes','vtiger_quotes','subject','quoteid')");
+Execute("insert into vtiger_entityname values(21,'PurchaseOrder','vtiger_purchaseorder','subject','purchaseorderid')");
+Execute("insert into vtiger_entityname values(22,'SalesOrder','vtiger_salesorder','subject','salesorderid')");
+Execute("insert into vtiger_entityname values(18,'Vendors','vtiger_vendor','vendorname','vendorid')");
+Execute("insert into vtiger_entityname values(19,'PriceBooks','vtiger_pricebook','bookname','pricebookid')");
+Execute("insert into vtiger_entityname values(26,'Campaigns','vtiger_campaign','campaignname','campaignid')");
+Execute("insert into vtiger_entityname values(15,'Faq','vtiger_faq','question','id')");
+
+//added quantity in stock in product default listview - All
+$res = $conn->query("select vtiger_cvcolumnlist.cvid from vtiger_cvcolumnlist inner join vtiger_customview on vtiger_cvcolumnlist.cvid=vtiger_customview.cvid where entitytype='Products' and viewname='All'");
+if($conn->num_rows != 0)
+{
+	$cvid = $conn->query_result($res,0,'cvid');
+	Execute("insert into vtiger_cvcolumnlist values($cvid,5,'vtiger_products:qtyinstock:qtyinstock:Products_Quantity_In_Stock:V')");
+}
+
 
 
 





More information about the vtigercrm-commits mailing list