fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [6741] booking: allow null at cost-field


From: Sigurd Nes
Subject: [Fmsystem-commits] [6741] booking: allow null at cost-field
Date: Mon, 10 Jan 2011 10:21:41 +0000

Revision: 6741
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=6741
Author:   sigurdne
Date:     2011-01-10 10:21:40 +0000 (Mon, 10 Jan 2011)
Log Message:
-----------
booking: allow null at cost-field

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

Modified: trunk/booking/setup/setup.inc.php
===================================================================
--- trunk/booking/setup/setup.inc.php   2011-01-10 08:53:36 UTC (rev 6740)
+++ trunk/booking/setup/setup.inc.php   2011-01-10 10:21:40 UTC (rev 6741)
@@ -1,6 +1,6 @@
 <?php
        $setup_info['booking']['name'] = 'booking';
-       $setup_info['booking']['version'] = '0.2.03';
+       $setup_info['booking']['version'] = '0.2.04';
        $setup_info['booking']['app_order'] = 9;
        $setup_info['booking']['enable'] = 1;
        $setup_info['booking']['app_group'] = 'office';

Modified: trunk/booking/setup/tables_current.inc.php
===================================================================
--- trunk/booking/setup/tables_current.inc.php  2011-01-10 08:53:36 UTC (rev 
6740)
+++ trunk/booking/setup/tables_current.inc.php  2011-01-10 10:21:40 UTC (rev 
6741)
@@ -204,7 +204,7 @@
                                'organization_id' => array('type' => 
'int','precision' => '4','nullable' => False),
                                'from_' => array('type' => 
'timestamp','nullable' => False),
                                'to_' => array('type' => 'timestamp','nullable' 
=> False),
-                               'cost' => array('type' => 'decimal','precision' 
=> '10', 'scale'=>'2', 'nullable' => False),
+                               'cost' => array('type' => 'decimal', 
'precision' => 10, 'scale' => 2,'nullable' => True,'default' => '0.0'),
                                'season_id' => array('type' => 
'int','precision' => '4','nullable' => False),
                                'completed' => array('type' => 'int', 
'precision' => '4', 'nullable' => False, 'default' => 0),
                        ),
@@ -228,7 +228,7 @@
                                'active' => array('type' => 'int', 'precision' 
=> 4,'nullable' => False,'default' => '1'),
                                'activity_id' => array('type' => 'int', 
'precision' => 4,'nullable' => False),
                                'completed' => array('type' => 'int', 
'precision' => 4,'nullable' => False,'default' => '0'),
-                               'cost' => array('type' => 'decimal', 
'precision' => 10, 'scale' => 2,'nullable' => False,'default' => '0.0'),
+                               'cost' => array('type' => 'decimal', 
'precision' => 10, 'scale' => 2,'nullable' => True,'default' => '0.0'),
                                'application_id' => array('type' => 'int', 
'precision' => 4,'nullable' => True),
                                'reminder' => array('type' => 'int', 
'precision' => 4,'nullable' => False,'default' => '0'),
                                'secret' => array('type' => 'text','nullable' 
=> False),
@@ -276,7 +276,7 @@
                                'season_id' => array('type' => 
'int','precision' => '4','nullable' => False),
                                'organization_id' => array('type' => 
'int','precision' => '4','nullable' => False),
                                'wday' => array('type' => 'int','precision' => 
'4','nullable' => False),
-                               'cost' => array('type' => 'decimal','precision' 
=> '10', 'scale'=>'2', 'nullable' => False),
+                               'cost' => array('type' => 'decimal', 
'precision' => 10, 'scale' => 2,'nullable' => True,'default' => '0.0'),
                                'from_' => array('type' => 'time','nullable' => 
False),
                                'to_' => array('type' => 'time','nullable' => 
False),
                        ),
@@ -517,7 +517,7 @@
                                'description' => array('type' => 
'text','nullable' => False),
                                'from_' => array('type' => 
'timestamp','nullable' => False),
                                'to_' => array('type' => 'timestamp','nullable' 
=> False),
-                               'cost' => array('type' => 'decimal', 
'precision' => 10, 'scale' => 2,'nullable' => False),
+                               'cost' => array('type' => 'decimal', 
'precision' => 10, 'scale' => 2,'nullable' => True,'default' => '0.0'),
                                'building_name' => array('type' => 'varchar', 
'precision' => 50,'nullable' => False),
                                'contact_name' => array('type' => 'varchar', 
'precision' => 50,'nullable' => False),
                                'contact_email' => array('type' => 'varchar', 
'precision' => 50,'nullable' => False),
@@ -654,7 +654,7 @@
                                'reservation_type'      => array('type' => 
'varchar', 'precision' => '70', 'nullable' => False),
                                'reservation_id'                => array('type' 
=> 'int', 'precision' => '4', 'nullable' => False),
                                'season_id'                     => array('type' 
=> 'int', 'precision' => '4'),
-                               'cost' => array('type' => 'decimal','precision' 
=> '10', 'scale'=>'2', 'nullable' => False),
+                               'cost' => array('type' => 'decimal', 
'precision' => 10, 'scale' => 2,'nullable' => True,'default' => '0.0'),
                                'from_' => array('type' => 'timestamp', 
'nullable' => false),
                                'to_' => array('type' => 'timestamp', 
'nullable' => false),
                                'organization_id'               => array('type' 
=> 'int', 'precision' => '4'),

Modified: trunk/booking/setup/tables_update.inc.php
===================================================================
--- trunk/booking/setup/tables_update.inc.php   2011-01-10 08:53:36 UTC (rev 
6740)
+++ trunk/booking/setup/tables_update.inc.php   2011-01-10 10:21:40 UTC (rev 
6741)
@@ -2432,3 +2432,27 @@
                }
        }
 
+       $test[] = '0.2.03';
+       /**
+       * Update booking version from 0.2.02 to 0.2.03
+       * Add custom fields to request
+       * 
+       */
+       function booking_upgrade0_2_03()
+       {
+               $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+               
$GLOBALS['phpgw_setup']->oProc->AlterColumn('bb_completed_reservation','cost',array('type'
 => 'decimal', 'precision' => 10, 'scale' => 2,'nullable' => true,'default' => 
'0.0'));
+               
$GLOBALS['phpgw_setup']->oProc->AlterColumn('bb_wtemplate_alloc','cost',array('type'
 => 'decimal', 'precision' => 10, 'scale' => 2,'nullable' => true,'default' => 
'0.0'));
+               
$GLOBALS['phpgw_setup']->oProc->AlterColumn('bb_allocation','cost',array('type' 
=> 'decimal', 'precision' => 10, 'scale' => 2,'nullable' => true,'default' => 
'0.0'));
+               
$GLOBALS['phpgw_setup']->oProc->AlterColumn('bb_booking','cost',array('type' => 
'decimal', 'precision' => 10, 'scale' => 2,'nullable' => true,'default' => 
'0.0'));
+               
$GLOBALS['phpgw_setup']->oProc->AlterColumn('bb_event','cost',array('type' => 
'decimal', 'precision' => 10, 'scale' => 2,'nullable' => true,'default' => 
'0.0'));
+
+               if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+               {
+                       $GLOBALS['setup_info']['booking']['currentver'] = 
'0.2.04';
+                       return $GLOBALS['setup_info']['booking']['currentver'];
+               }
+       }
+
+




reply via email to

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