fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [11445] booking: alter field len


From: Sigurd Nes
Subject: [Fmsystem-commits] [11445] booking: alter field len
Date: Tue, 12 Nov 2013 08:43:06 +0000

Revision: 11445
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=11445
Author:   sigurdne
Date:     2013-11-12 08:43:05 +0000 (Tue, 12 Nov 2013)
Log Message:
-----------
booking: alter field len

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

Modified: trunk/activitycalendar/setup/setup.inc.php
===================================================================
--- trunk/activitycalendar/setup/setup.inc.php  2013-11-11 15:26:45 UTC (rev 
11444)
+++ trunk/activitycalendar/setup/setup.inc.php  2013-11-12 08:43:05 UTC (rev 
11445)
@@ -30,7 +30,7 @@
 
        $setup_info['activitycalendar']['depends'][] = array(
                'appname' => 'booking',
-               'versions' => 
array('0.2.05','0.2.06','0.2.07','0.2.08','0.2.09','0.2.10', '0.2.11')
+               'versions' => 
array('0.2.05','0.2.06','0.2.07','0.2.08','0.2.09','0.2.10', '0.2.11','0.2.12')
        );
 
        $setup_info['activitycalendar']['depends'][] = array(

Modified: trunk/activitycalendarfrontend/setup/setup.inc.php
===================================================================
--- trunk/activitycalendarfrontend/setup/setup.inc.php  2013-11-11 15:26:45 UTC 
(rev 11444)
+++ trunk/activitycalendarfrontend/setup/setup.inc.php  2013-11-12 08:43:05 UTC 
(rev 11445)
@@ -22,7 +22,7 @@
 
 $setup_info['activitycalendarfrontend']['depends'][] = array(
     'appname' => 'booking',
-    'versions' => Array('0.2.00', '0.2.01', '0.2.02', '0.2.03', '0.2.04', 
'0.2.05', '0.2.06', '0.2.07', '0.2.08', '0.2.09', '0.2.10', '0.2.11')
+    'versions' => Array('0.2.00', '0.2.01', '0.2.02', '0.2.03', '0.2.04', 
'0.2.05', '0.2.06', '0.2.07', '0.2.08', '0.2.09', '0.2.10', '0.2.11','0.2.12')
 );
 
 $setup_info['activitycalendarfrontend']['depends'][] = array(

Modified: trunk/booking/setup/setup.inc.php
===================================================================
--- trunk/booking/setup/setup.inc.php   2013-11-11 15:26:45 UTC (rev 11444)
+++ trunk/booking/setup/setup.inc.php   2013-11-12 08:43:05 UTC (rev 11445)
@@ -1,6 +1,6 @@
 <?php
        $setup_info['booking']['name'] = 'booking';
-       $setup_info['booking']['version'] = '0.2.11';
+       $setup_info['booking']['version'] = '0.2.12';
        $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  2013-11-11 15:26:45 UTC (rev 
11444)
+++ trunk/booking/setup/tables_current.inc.php  2013-11-12 08:43:05 UTC (rev 
11445)
@@ -4,7 +4,7 @@
                        'fd' => array(
                                'id' => array('type' => 'auto', 'nullable' => 
FALSE),
                                'parent_id' => array('type' => 
'int','precision' => '4','nullable' => TRUE),
-                               'name' => array('type' => 'varchar','precision' 
=> '50','nullable' => FALSE),
+                               'name' => array('type' => 'varchar','precision' 
=> '150','nullable' => FALSE),
                                'description' => array('type' => 
'varchar','precision' => '10000','nullable' => FALSE),
                                'active' => array('type' => 'int', 'nullable' 
=> False,'precision' => '4', 'default' => 1),
                        ),
@@ -22,7 +22,7 @@
                                'deactivate_calendar' => array('type' => 'int', 
'nullable' => False,'precision' => '4', 'default' => 0),
                                'deactivate_application' => array('type' => 
'int', 'nullable' => False,'precision' => '4', 'default' => 0),
                                'deactivate_sendmessage' => array('type' => 
'int', 'nullable' => False,'precision' => '4', 'default' => 0),
-                               'name' => array('type' => 'varchar','precision' 
=> '50','nullable' => False),
+                               'name' => array('type' => 'varchar','precision' 
=> '150','nullable' => False),
                                'homepage' => array('type' => 'text', 
'nullable' => False),
                                'location_code' => array('type' => 
'varchar','precision' => '50','nullable' => True),
                                'phone' => array('type' => 
'varchar','precision' => '50','nullable' => True),
@@ -55,7 +55,7 @@
                        'fd' => array(
                                'id' => array('type' => 'auto', 'nullable' => 
false),
                                'ssn' => array('type' => 'varchar', 'precision' 
=> '12', 'nullable' => True,),
-                               'name' => array('type' => 'varchar','precision' 
=> '50','nullable' => False),
+                               'name' => array('type' => 'varchar','precision' 
=> '150','nullable' => False),
                                'homepage' => array('type' => 'text', 
'nullable' => True),
                                'phone' => array('type' => 
'varchar','precision' => '50','nullable' => True),
                                'email' => array('type' => 
'varchar','precision' => '50','nullable' => True),
@@ -71,7 +71,7 @@
                                'id' => array('type' => 'auto', 'nullable' => 
false),
                                'organization_number' => array('type' => 
'varchar', 'precision' => '9', 'nullable' => False, 'default' => ''),
                                'active' => array('type' => 'int', 'nullable' 
=> False,'precision' => '4', 'default' => 1),
-                               'name' => array('type' => 'varchar','precision' 
=> '50','nullable' => False),
+                               'name' => array('type' => 'varchar','precision' 
=> '150','nullable' => False),
                                'homepage' => array('type' => 'text', 
'nullable' => True),
                                'phone' => array('type' => 
'varchar','precision' => '50','nullable' => True),
                                'email' => array('type' => 
'varchar','precision' => '50','nullable' => True),
@@ -100,7 +100,7 @@
                                'id' => array('type' => 'auto', 'nullable' => 
false),
                                'active' => array('type' => 'int', 'nullable' 
=> False,'precision' => '4', 'default' => 1),
                                'building_id' => array('type' => 
'int','precision' => '4','nullable' => False),
-                               'name' => array('type' => 'varchar','precision' 
=> '50','nullable' => False),
+                               'name' => array('type' => 'varchar','precision' 
=> '150','nullable' => False),
                                'type' => array('type' => 'varchar', 
'precision' => '50', 'nullable' => False),
                                'description' => array('type' => 'text', 
'nullable' => True),
                                'activity_id' => array('type' => 
'int','precision' => '4','nullable' => False),
@@ -119,7 +119,7 @@
                                'active' => array('type' => 'int', 'nullable' 
=> False,'precision' => '4', 'default' => 1),
                                'organization_id' => array('type' => 
'int','precision' => '4','nullable' => False),
                                'description' => array('type' => 'text', 
'nullable' => True),
-                               'name' => array('type' => 'varchar','precision' 
=> '50','nullable' => False),
+                               'name' => array('type' => 'varchar','precision' 
=> '150','nullable' => False),
                                'activity_id' => array('type' => 
'int','precision' => '4','nullable' => True),
                                'shortname' => array('type' => 
'varchar','precision' => '11', 'nullable' => True),                      
                                'show_in_portal' => array('type' => 'int', 
'nullable' => False,'precision' => '4', 'default' => 0),
@@ -137,7 +137,7 @@
                                'officer_id' => array('type' => 'int', 
'precision'=> '4', 'nullable' => false),
                                'active' => array('type' => 'int', 'nullable' 
=> False,'precision' => '4', 'default' => 1),
                                'building_id' => array('type' => 
'int','precision' => '4','nullable' => False),
-                               'name' => array('type' => 'varchar','precision' 
=> '50','nullable' => False),
+                               'name' => array('type' => 'varchar','precision' 
=> '150','nullable' => False),
                                'status' => array('type' => 
'varchar','precision' => '10','nullable' => False),
                                'from_' => array('type' => 'date','nullable' => 
False),
                                'to_' => array('type' => 'date','nullable' => 
False),
@@ -175,7 +175,7 @@
                                'created' => array('type' => 'timestamp', 
'nullable'=> False, 'default' => 'current_timestamp'),
                                'modified' => array('type' => 'timestamp', 
'nullable'=> False),
                                'frontend_modified' => array('type' => 
'timestamp', 'nullable'=> True),
-                               'building_name' => array('type' => 'varchar', 
'precision' => 100,'nullable' => False, 'default' => 'changeme'),
+                               'building_name' => array('type' => 'varchar', 
'precision' => 150,'nullable' => False, 'default' => 'changeme'),
                                'activity_id' => array('type' => 
'int','precision' => '4','nullable' => False),
                                'description' => array('type' => 'text', 
'nullable' => False),
                                'contact_name' => array('type' => 'text', 
'nullable' => False),
@@ -203,7 +203,7 @@
                                'id' => array('type' => 'auto', 'nullable' => 
False),
                                'id_string' => array('type' => 
'varchar','precision' => '20', 'nullable' => False, 'default' => '0'),
                                'active' => array('type' => 'int', 'nullable' 
=> False,'precision' => '4', 'default' => 1),
-                               'building_name' => array('type' => 'varchar', 
'precision' => 100,'nullable' => False, 'default' => 'changeme'),
+                               'building_name' => array('type' => 'varchar', 
'precision' => 150,'nullable' => False, 'default' => 'changeme'),
                                'application_id' => array('type' => 
'int','precision' => '4','nullable' => True),
                                'organization_id' => array('type' => 
'int','precision' => '4','nullable' => False),
                                'from_' => array('type' => 
'timestamp','nullable' => False),
@@ -226,7 +226,7 @@
                                'group_id' => array('type' => 'int', 
'precision' => 4,'nullable' => False),
                                'from_' => array('type' => 
'timestamp','nullable' => False),
                                'to_' => array('type' => 'timestamp','nullable' 
=> False),
-                               'building_name' => array('type' => 'varchar', 
'precision' => 100,'nullable' => False, 'default' => 'changeme'),
+                               'building_name' => array('type' => 'varchar', 
'precision' => 150,'nullable' => False, 'default' => 'changeme'),
                                'allocation_id' => array('type' => 'int', 
'precision' => 4,'nullable' => True),
                                'season_id' => array('type' => 'int', 
'precision' => 4,'nullable' => False),
                                'active' => array('type' => 'int', 'precision' 
=> 4,'nullable' => False,'default' => '1'),
@@ -485,7 +485,7 @@
                'bb_organization_contact' => array(
                        'fd' => array(
                                'id' => array('type' => 'auto', 'nullable' => 
false),
-                               'name' => array('type' => 'varchar', 
'precision' => '50', 'nullable' => True),
+                               'name' => array('type' => 'varchar', 
'precision' => '150', 'nullable' => True),
                                'ssn' => array('type' => 'varchar',  
'precision' => '12', 'nullable' => True),
                                'phone' => array('type' => 'varchar', 
'precision' => '50', 'nullable' => True),
                                'email' => array('type' => 'varchar', 
'precision' => '50', 'nullable' => True),
@@ -501,7 +501,7 @@
                'bb_group_contact' => array(
                        'fd' => array(
                                'id' => array('type' => 'auto', 'nullable' => 
false),
-                               'name' => array('type' => 'varchar', 
'precision' => '50', 'nullable' => True),
+                               'name' => array('type' => 'varchar', 
'precision' => '150', 'nullable' => True),
                                'phone' => array('type' => 'varchar', 
'precision' => '50', 'nullable' => True),
                                'email' => array('type' => 'varchar', 
'precision' => '50', 'nullable' => True),
                                'group_id' => array('type' => 'int', 
'precision' => '4', 'nullable' => false),
@@ -523,12 +523,12 @@
                                'from_' => array('type' => 
'timestamp','nullable' => False),
                                'to_' => array('type' => 'timestamp','nullable' 
=> False),
                                'cost' => array('type' => 'decimal', 
'precision' => 10, 'scale' => 2,'nullable' => True,'default' => '0.0'),
-                               'building_name' => array('type' => 'varchar', 
'precision' => 100,'nullable' => False, 'default' => 'changeme'),
-                               'contact_name' => array('type' => 'varchar', 
'precision' => 50,'nullable' => False),
+                               'building_name' => array('type' => 'varchar', 
'precision' => 150,'nullable' => False, 'default' => 'changeme'),
+                               'contact_name' => array('type' => 'varchar', 
'precision' => 150,'nullable' => False),
                                'contact_email' => array('type' => 'varchar', 
'precision' => 50,'nullable' => False),
                                'contact_phone' => array('type' => 'varchar', 
'precision' => 50,'nullable' => False),
                                'completed' => array('type' => 'int', 
'precision' => 4,'nullable' => False,'default' => '0'),
-                               'customer_organization_name' => array('type' => 
'varchar', 'precision' => 50,'nullable' => True),
+                               'customer_organization_name' => array('type' => 
'varchar', 'precision' => 150,'nullable' => True),
                                'customer_organization_id' => array('type' => 
'int', 'precision' => 4,'nullable' => True),
                                'customer_identifier_type' => array('type' => 
'varchar', 'precision' => 255,'nullable' => True),
                                'customer_organization_number' => array('type' 
=> 'varchar', 'precision' => 9,'nullable' => True),
@@ -757,8 +757,8 @@
                                'created' => array('type' => 'timestamp', 
'nullable' => False,'default' => 'current_timestamp'),
                                'display_in_dashboard' => array('type' => 
'int', 'nullable' => False, 'precision' => '4', 'default' => 1),
                                'building_id' => array('type' => 'int', 
'precision' => '4'),
-                               'building_name' => array('type' => 'varchar', 
'precision' => '100','nullable' => False),
-                               'name' => array('type' => 'varchar','precision' 
=> '50','nullable' => False),
+                               'building_name' => array('type' => 'varchar', 
'precision' => '150','nullable' => False),
+                               'name' => array('type' => 'varchar','precision' 
=> '150','nullable' => False),
                                'phone' => array('type' => 
'varchar','precision' => '50','nullable' => true),
                                'email' => array('type' => 
'varchar','precision' => '50','nullable' => true),
                                'message' => array('type' => 'text', 'nullable' 
=> False),

Modified: trunk/booking/setup/tables_update.inc.php
===================================================================
--- trunk/booking/setup/tables_update.inc.php   2013-11-11 15:26:45 UTC (rev 
11444)
+++ trunk/booking/setup/tables_update.inc.php   2013-11-12 08:43:05 UTC (rev 
11445)
@@ -2710,3 +2710,134 @@
                        return $GLOBALS['setup_info']['booking']['currentver'];
                }
        }
+
+       $test[] = '0.2.11';
+       /**
+       * Update booking version from 0.2.11 to 0.2.12
+       * alter lenght of name fields
+       * 
+       */
+       function booking_upgrade0_2_11()
+       {
+               $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+
+               $GLOBALS['phpgw_setup']->oProc->AlterColumn('bb_activity', 
'name',array(
+                       'type' => 'varchar',
+                       'precision' => 150,
+                       'nullable' => False
+                       )
+               );
+               $GLOBALS['phpgw_setup']->oProc->AlterColumn('bb_building', 
'name',array(
+                       'type' => 'varchar',
+                       'precision' => 150,
+                       'nullable' => False
+                       )
+               );
+               
$GLOBALS['phpgw_setup']->oProc->AlterColumn('bb_contact_person', 'name',array(
+                       'type' => 'varchar',
+                       'precision' => 150,
+                       'nullable' => False
+                       )
+               );
+               $GLOBALS['phpgw_setup']->oProc->AlterColumn('bb_organization', 
'name',array(
+                       'type' => 'varchar',
+                       'precision' => 150,
+                       'nullable' => False
+                       )
+               );
+               $GLOBALS['phpgw_setup']->oProc->AlterColumn('bb_resource', 
'name',array(
+                       'type' => 'varchar',
+                       'precision' => 150,
+                       'nullable' => False
+                       )
+               );
+               $GLOBALS['phpgw_setup']->oProc->AlterColumn('bb_group', 
'name',array(
+                       'type' => 'varchar',
+                       'precision' => 150,
+                       'nullable' => False
+                       )
+               );
+               $GLOBALS['phpgw_setup']->oProc->AlterColumn('bb_season', 
'name',array(
+                       'type' => 'varchar',
+                       'precision' => 150,
+                       'nullable' => False
+                       )
+               );
+               
$GLOBALS['phpgw_setup']->oProc->AlterColumn('bb_organization_contact', 
'name',array(
+                       'type' => 'varchar',
+                       'precision' => 150,
+                       'nullable' => true
+                       )
+               );
+               $GLOBALS['phpgw_setup']->oProc->AlterColumn('bb_group_contact', 
'name',array(
+                       'type' => 'varchar',
+                       'precision' => 150,
+                       'nullable' => true
+                       )
+               );
+
+               $GLOBALS['phpgw_setup']->oProc->AlterColumn('bb_application', 
'building_name',array(
+                       'type' => 'varchar',
+                       'precision' => 150,
+                       'nullable' => False,
+                       'default' => 'changeme'
+                       )
+               );
+               $GLOBALS['phpgw_setup']->oProc->AlterColumn('bb_allocation', 
'building_name',array(
+                       'type' => 'varchar',
+                       'precision' => 150,
+                       'nullable' => False,
+                       'default' => 'changeme'
+                       )
+               );
+               $GLOBALS['phpgw_setup']->oProc->AlterColumn('bb_booking', 
'building_name',array(
+                       'type' => 'varchar',
+                       'precision' => 150,
+                       'nullable' => False,
+                       'default' => 'changeme'
+                       )
+               );
+
+               $GLOBALS['phpgw_setup']->oProc->AlterColumn('bb_event', 
'building_name',array(
+                       'type' => 'varchar',
+                       'precision' => 150,
+                       'nullable' => False,
+                       'default' => 'changeme'
+                       )
+               );
+
+               $GLOBALS['phpgw_setup']->oProc->AlterColumn('bb_event', 
'contact_name',array(
+                       'type' => 'varchar',
+                       'precision' => 150,
+                       'nullable' => false
+                       )
+               );
+
+               $GLOBALS['phpgw_setup']->oProc->AlterColumn('bb_event', 
'customer_organization_name',array(
+                       'type' => 'varchar',
+                       'precision' => 150,
+                       'nullable' => true
+                       )
+               );
+
+               
$GLOBALS['phpgw_setup']->oProc->AlterColumn('bb_system_message', 
'building_name',array(
+                       'type' => 'varchar',
+                       'precision' => 150,
+                       'nullable' => false
+                       )
+               );
+
+               
$GLOBALS['phpgw_setup']->oProc->AlterColumn('bb_system_message', 'name',array(
+                       'type' => 'varchar',
+                       'precision' => 150,
+                       'nullable' => false
+                       )
+               );
+
+               if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+               {
+                       $GLOBALS['setup_info']['booking']['currentver'] = 
'0.2.12';
+                       return $GLOBALS['setup_info']['booking']['currentver'];
+               }
+       }

Modified: trunk/bookingfrontend/setup/setup.inc.php
===================================================================
--- trunk/bookingfrontend/setup/setup.inc.php   2013-11-11 15:26:45 UTC (rev 
11444)
+++ trunk/bookingfrontend/setup/setup.inc.php   2013-11-12 08:43:05 UTC (rev 
11445)
@@ -21,7 +21,7 @@
 
        $setup_info['bookingfrontend']['depends'][] = array(
                'appname' => 'booking',
-               'versions' => Array('0.2.00', 
'0.2.01','0.2.02','0.2.03','0.2.04','0.2.05','0.2.06','0.2.07','0.2.08','0.2.09','0.2.10','0.2.11')
+               'versions' => Array('0.2.00', 
'0.2.01','0.2.02','0.2.03','0.2.04','0.2.05','0.2.06','0.2.07','0.2.08','0.2.09','0.2.10','0.2.11','0.2.12')
        );
 
        $setup_info['bookingfrontend']['depends'][] = array(




reply via email to

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