[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [6504] Property: alter datatype
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [6504] Property: alter datatype |
Date: |
Thu, 21 Oct 2010 07:56:33 +0000 |
Revision: 6504
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=6504
Author: sigurdne
Date: 2010-10-21 07:56:32 +0000 (Thu, 21 Oct 2010)
Log Message:
-----------
Property: alter datatype
Modified Paths:
--------------
trunk/property/setup/setup.inc.php
trunk/property/setup/tables_update.inc.php
Modified: trunk/property/setup/setup.inc.php
===================================================================
--- trunk/property/setup/setup.inc.php 2010-10-20 11:45:30 UTC (rev 6503)
+++ trunk/property/setup/setup.inc.php 2010-10-21 07:56:32 UTC (rev 6504)
@@ -12,7 +12,7 @@
*/
$setup_info['property']['name'] = 'property';
- $setup_info['property']['version'] = '0.9.17.595';
+ $setup_info['property']['version'] = '0.9.17.596';
$setup_info['property']['app_order'] = 8;
$setup_info['property']['enable'] = 1;
$setup_info['property']['app_group'] = 'office';
Modified: trunk/property/setup/tables_update.inc.php
===================================================================
--- trunk/property/setup/tables_update.inc.php 2010-10-20 11:45:30 UTC (rev
6503)
+++ trunk/property/setup/tables_update.inc.php 2010-10-21 07:56:32 UTC (rev
6504)
@@ -4548,7 +4548,7 @@
}
}
/**
- * Update property version from 0.9.17.578 to 0.9.17.579
+ * Update property version from 0.9.17.594 to 0.9.17.595
* Add custom dimension for orders
*
*/
@@ -4567,3 +4567,43 @@
}
}
+ /**
+ * Update property version from 0.9.17.595 to 0.9.17.596
+ * Alter datatype
+ *
+ */
+
+ $test[] = '0.9.17.595';
+ function property_upgrade0_9_17_595()
+ {
+ $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+ $GLOBALS['phpgw_setup']->oProc->query("SELECT id, b_account_id
FROM fm_tenant_claim");
+ $claims = array();
+ while ($GLOBALS['phpgw_setup']->oProc->next_record())
+ {
+ $claims[] = array
+ (
+ 'id' =>
(int)$GLOBALS['phpgw_setup']->oProc->f('id'),
+ 'b_account_id' =>
$GLOBALS['phpgw_setup']->oProc->f('b_account_id')
+ );
+ }
+
+
$GLOBALS['phpgw_setup']->oProc->DropColumn('fm_tenant_claim',array(),'b_account_id');
+
$GLOBALS['phpgw_setup']->oProc->AddColumn('fm_tenant_claim','b_account_id',array('type'
=> 'varchar','precision' => 20,'nullable' => True));
+
+ foreach($claims as $claim)
+ {
+ $sql = "UPDATE fm_tenant_claim SET b_account_id =
{$claim['b_account_id']} WHERE id = {$claim['id']}";
+
+
$GLOBALS['phpgw_setup']->oProc->query($sql,__LINE__,__FILE__);
+ }
+
+
+ if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+ {
+ $GLOBALS['setup_info']['property']['currentver'] =
'0.9.17.596';
+ return $GLOBALS['setup_info']['property']['currentver'];
+ }
+ }
+
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [6504] Property: alter datatype,
Sigurd Nes <=