[Vtigercrm-commits] [vtiger-commits] r9224 - /vtigercrm/trunk/modules/Migration/ModifyDatabase/42P2_to_50.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Thu Aug 31 06:29:37 EDT 2006


Author: saraj
Date: Thu Aug 31 04:29:33 2006
New Revision: 9224

Log:
* Added changes to add id, sortorderid and presence in all custom field picklist tables

Modified:
    vtigercrm/trunk/modules/Migration/ModifyDatabase/42P2_to_50.php

Modified: vtigercrm/trunk/modules/Migration/ModifyDatabase/42P2_to_50.php
==============================================================================
--- vtigercrm/trunk/modules/Migration/ModifyDatabase/42P2_to_50.php (original)
+++ vtigercrm/trunk/modules/Migration/ModifyDatabase/42P2_to_50.php Thu Aug 31 04:29:33 2006
@@ -3608,8 +3608,21 @@
 }
 //changes made for CustomView and Reports - Activities changed to Calendar -- Ends
 
-
-
+Execute("update vtiger_field set uitype = 16 where tabid=2 and uitype=111 and columnname='sales_stage'");
+
+//we have to add id, sortorderid and presence in all existing custom field pick list tables.
+$cf_picklist_res = $conn->query("select fieldname from vtiger_field where uitype=15 and fieldname like 'cf_%'");
+$noofPicklists = $conn->num_rows($cf_picklist_res);
+for($i=0;$i<$noofPicklists;$i++)
+{
+	$fieldname = $conn->query_result($cf_picklist_res,$i,'fieldname');
+
+	$tablename = "vtiger_".$fieldname;
+	$idname = $fieldname."id";
+
+	$alterquery = "alter table $tablename add column $idname int(19) auto_increment PRIMARY KEY FIRST, add column sortorderid int(19) default 0 NOT NULL, add column presence int(1) default 1 NOT NULL";
+	Execute($alterquery);
+}
 
 
 





More information about the vtigercrm-commits mailing list