fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [6536] bkbooking: fixed bug in sql in update script a


From: Kjell Arne Espedal
Subject: [Fmsystem-commits] [6536] bkbooking: fixed bug in sql in update script added it one more time to fix errors in updated databases
Date: Wed, 03 Nov 2010 10:10:14 +0000

Revision: 6536
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=6536
Author:   kjell
Date:     2010-11-03 10:10:14 +0000 (Wed, 03 Nov 2010)
Log Message:
-----------
bkbooking: fixed bug in sql in update script added it one more time to fix 
errors in updated databases

Modified Paths:
--------------
    trunk/booking/setup/setup.inc.php
    trunk/booking/setup/tables_update.inc.php
    trunk/bookingfrontend/setup/setup.inc.php

Modified: trunk/booking/setup/setup.inc.php
===================================================================
--- trunk/booking/setup/setup.inc.php   2010-11-03 09:41:33 UTC (rev 6535)
+++ trunk/booking/setup/setup.inc.php   2010-11-03 10:10:14 UTC (rev 6536)
@@ -1,6 +1,6 @@
 <?php
        $setup_info['booking']['name'] = 'booking';
-       $setup_info['booking']['version'] = '0.2.00';
+       $setup_info['booking']['version'] = '0.2.01';
        $setup_info['booking']['app_order'] = 9;
        $setup_info['booking']['enable'] = 1;
        $setup_info['booking']['app_group'] = 'office';

Modified: trunk/booking/setup/tables_update.inc.php
===================================================================
--- trunk/booking/setup/tables_update.inc.php   2010-11-03 09:41:33 UTC (rev 
6535)
+++ trunk/booking/setup/tables_update.inc.php   2010-11-03 10:10:14 UTC (rev 
6536)
@@ -2372,7 +2372,7 @@
 
                $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
                $GLOBALS['phpgw_setup']->oProc->m_odb->query("ALTER TABLE 
bb_application ADD COLUMN building_name varchar(50) NOT NULL DEFAULT 
'changeme'");
-               $GLOBALS['phpgw_setup']->oProc->m_odb->query("UPDATE 
bb_application SET building_name = b2.name FROM bb_building b2 WHERE EXISTS 
(SELECT 1 FROM bb_building b, bb_application a, bb_application_resource 
ar,bb_resource r WHERE a.activity_id = ar.application_id AND ar.resource_id = 
r.id AND r.building_id = b.id AND b2.id=b.id AND bb_application.id=a.id)");
+               $GLOBALS['phpgw_setup']->oProc->m_odb->query("UPDATE 
bb_application SET building_name = b2.name FROM bb_building b2 WHERE EXISTS 
(SELECT 1 FROM bb_building b, bb_application a, bb_application_resource 
ar,bb_resource r WHERE a.id = ar.application_id AND ar.resource_id = r.id AND 
r.building_id = b.id AND b2.id=b.id AND bb_application.id=a.id)");
 
                if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
                {
@@ -2380,4 +2380,18 @@
                        return $GLOBALS['setup_info']['booking']['currentver'];
                }
        }
+  $test[] = '0.2.00';
+       function booking_upgrade0_2_00()
+       {
 
+               $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+               $GLOBALS['phpgw_setup']->oProc->m_odb->query("UPDATE 
bb_application SET building_name = b2.name FROM bb_building b2 WHERE EXISTS 
(SELECT 1 FROM bb_building b, bb_application a, bb_application_resource 
ar,bb_resource r WHERE a.id = ar.application_id AND ar.resource_id = r.id AND 
r.building_id = b.id AND b2.id=b.id AND bb_application.id=a.id)");
+
+               if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+               {
+                       $GLOBALS['setup_info']['booking']['currentver'] = 
'0.2.01';
+                       return $GLOBALS['setup_info']['booking']['currentver'];
+               }
+       }
+
+

Modified: trunk/bookingfrontend/setup/setup.inc.php
===================================================================
--- trunk/bookingfrontend/setup/setup.inc.php   2010-11-03 09:41:33 UTC (rev 
6535)
+++ trunk/bookingfrontend/setup/setup.inc.php   2010-11-03 10:10:14 UTC (rev 
6536)
@@ -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', '0.1.99', '0.2.00')
+               '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', '0.2.00', '0.2.01')
        );
 
        $setup_info['bookingfrontend']['depends'][] = array(




reply via email to

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