fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [6505] merge 6502:6504 from trunk


From: Sigurd Nes
Subject: [Fmsystem-commits] [6505] merge 6502:6504 from trunk
Date: Thu, 21 Oct 2010 08:01:01 +0000

Revision: 6505
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=6505
Author:   sigurdne
Date:     2010-10-21 08:00:59 +0000 (Thu, 21 Oct 2010)
Log Message:
-----------
merge 6502:6504 from trunk

Modified Paths:
--------------
    branches/Version-1_0-branch/booking/inc/class.soallocation.inc.php
    branches/Version-1_0-branch/booking/inc/class.sobooking.inc.php
    branches/Version-1_0-branch/booking/inc/class.uiallocation.inc.php
    branches/Version-1_0-branch/booking/setup/setup.inc.php
    branches/Version-1_0-branch/booking/setup/tables_update.inc.php
    branches/Version-1_0-branch/bookingfrontend/setup/setup.inc.php
    branches/Version-1_0-branch/property/setup/setup.inc.php
    branches/Version-1_0-branch/property/setup/tables_update.inc.php

Property Changed:
----------------
    branches/Version-1_0-branch/


Property changes on: branches/Version-1_0-branch
___________________________________________________________________
Modified: svn:mergeinfo
   - 
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501
   + 
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501,6503-6504

Modified: branches/Version-1_0-branch/booking/inc/class.soallocation.inc.php
===================================================================
--- branches/Version-1_0-branch/booking/inc/class.soallocation.inc.php  
2010-10-21 07:56:32 UTC (rev 6504)
+++ branches/Version-1_0-branch/booking/inc/class.soallocation.inc.php  
2010-10-21 08:00:59 UTC (rev 6505)
@@ -21,6 +21,7 @@
                                        'active'                => array('type' 
=> 'int', 'required' => true),
                                        'application_id'        => array('type' 
=> 'int', 'required' => false),
                                        'organization_id'               => 
array('type' => 'int', 'required' => true),
+                                       'building_name' => array('type' => 
'string', 'required'=> true, 'query' => true),
                                        'season_id'             => array('type' 
=> 'int', 'required' => 'true'),
                                        'from_'         => array('type' => 
'string', 'required'=> true),
                                        'to_'           => array('type' => 
'string', 'required'=> true),

Modified: branches/Version-1_0-branch/booking/inc/class.sobooking.inc.php
===================================================================
--- branches/Version-1_0-branch/booking/inc/class.sobooking.inc.php     
2010-10-21 07:56:32 UTC (rev 6504)
+++ branches/Version-1_0-branch/booking/inc/class.sobooking.inc.php     
2010-10-21 08:00:59 UTC (rev 6505)
@@ -12,6 +12,7 @@
                                        'allocation_id' => array('type' => 
'int', 'required' => false),
                                        'application_id'        => array('type' 
=> 'int', 'required' => false),
                                        'activity_id'   => array('type' => 
'int', 'required' => true),
+                                       'building_name' => array('type' => 
'string', 'required'=> true, 'query' => true),
                                        'group_id'              => array('type' 
=> 'int', 'required' => true),
                                        'from_'         => array('type' => 
'timestamp', 'required'=> true),
                                        'to_'           => array('type' => 
'timestamp', 'required'=> true),

Modified: branches/Version-1_0-branch/booking/inc/class.uiallocation.inc.php
===================================================================
--- branches/Version-1_0-branch/booking/inc/class.uiallocation.inc.php  
2010-10-21 07:56:32 UTC (rev 6504)
+++ branches/Version-1_0-branch/booking/inc/class.uiallocation.inc.php  
2010-10-21 08:00:59 UTC (rev 6505)
@@ -68,6 +68,10 @@
                                                        'label' => 
lang('Organization shortname')
                                                ),
                                                array(
+                                                       'key' => 
'building_name',
+                                                       'label' => 
lang('Building')
+                                               ),
+                                               array(
                                                        'key' => 'season_name',
                                                        'label' => 
lang('Season')
                                                ),

Modified: branches/Version-1_0-branch/booking/setup/setup.inc.php
===================================================================
--- branches/Version-1_0-branch/booking/setup/setup.inc.php     2010-10-21 
07:56:32 UTC (rev 6504)
+++ branches/Version-1_0-branch/booking/setup/setup.inc.php     2010-10-21 
08:00:59 UTC (rev 6505)
@@ -1,6 +1,6 @@
 <?php
        $setup_info['booking']['name'] = 'booking';
-       $setup_info['booking']['version'] = '0.1.98';
+       $setup_info['booking']['version'] = '0.1.99';
        $setup_info['booking']['app_order'] = 9;
        $setup_info['booking']['enable'] = 1;
        $setup_info['booking']['app_group'] = 'office';

Modified: branches/Version-1_0-branch/booking/setup/tables_update.inc.php
===================================================================
--- branches/Version-1_0-branch/booking/setup/tables_update.inc.php     
2010-10-21 07:56:32 UTC (rev 6504)
+++ branches/Version-1_0-branch/booking/setup/tables_update.inc.php     
2010-10-21 08:00:59 UTC (rev 6505)
@@ -2349,4 +2349,21 @@
                        return $GLOBALS['setup_info']['booking']['currentver'];
                }
        }
+  $test[] = '0.1.98';
+       function booking_upgrade0_1_98()
+       {
 
+               $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+               $GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE 
bb_booking ADD COLUMN building_name varchar(50) NOT NULL DEFAULT 'changeme'");
+               $GLOBALS['phpgw_setup']->oProc->m_odb->query("UPDATE bb_booking 
SET building_name = b2.name FROM bb_building b2 WHERE EXISTS (SELECT 1 FROM 
bb_booking bo,bb_season s,bb_building b WHERE bo.season_id = s.id AND 
s.building_id = b.id AND b2.id=b.id AND bb_booking.id=bo.id)");
+               $GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE 
bb_allocation ADD COLUMN building_name varchar(50) NOT NULL DEFAULT 
'changeme'");
+               $GLOBALS['phpgw_setup']->oProc->m_odb->query("UPDATE 
bb_allocation SET building_name = b2.name FROM bb_building b2 WHERE EXISTS 
(SELECT 1 FROM bb_allocation a,bb_season s,bb_building b WHERE s.id = 
a.season_id AND s.building_id = b.id AND b2.id=b.id AND 
bb_allocation.id=a.id)");
+
+               if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+               {
+                       $GLOBALS['setup_info']['booking']['currentver'] = 
'0.1.99';
+                       return $GLOBALS['setup_info']['booking']['currentver'];
+               }
+       }
+

Modified: branches/Version-1_0-branch/bookingfrontend/setup/setup.inc.php
===================================================================
--- branches/Version-1_0-branch/bookingfrontend/setup/setup.inc.php     
2010-10-21 07:56:32 UTC (rev 6504)
+++ branches/Version-1_0-branch/bookingfrontend/setup/setup.inc.php     
2010-10-21 08:00:59 UTC (rev 6505)
@@ -21,7 +21,7 @@
 
        $setup_info['bookingfrontend']['depends'][] = array(
                'appname' => 'booking',
-               'versions' => Array('0.1.92', '0.1.93', '0.1.94', '0.1.95', 
'0.1.96', '0.1.97', '0.1.98')
+               'versions' => Array('0.1.92', '0.1.93', '0.1.94', '0.1.95', 
'0.1.96', '0.1.97', '0.1.98', '0.1.99')
        );
 
        $setup_info['bookingfrontend']['depends'][] = array(

Modified: branches/Version-1_0-branch/property/setup/setup.inc.php
===================================================================
--- branches/Version-1_0-branch/property/setup/setup.inc.php    2010-10-21 
07:56:32 UTC (rev 6504)
+++ branches/Version-1_0-branch/property/setup/setup.inc.php    2010-10-21 
08:00:59 UTC (rev 6505)
@@ -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: branches/Version-1_0-branch/property/setup/tables_update.inc.php
===================================================================
--- branches/Version-1_0-branch/property/setup/tables_update.inc.php    
2010-10-21 07:56:32 UTC (rev 6504)
+++ branches/Version-1_0-branch/property/setup/tables_update.inc.php    
2010-10-21 08:00:59 UTC (rev 6505)
@@ -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'];
+               }
+       }
+




reply via email to

[Prev in Thread] Current Thread [Next in Thread]