fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [8603] controler: fix install script and alter dataty


From: Sigurd Nes
Subject: [Fmsystem-commits] [8603] controler: fix install script and alter datatype for location_code
Date: Wed, 18 Jan 2012 12:31:12 +0000

Revision: 8603
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8603
Author:   sigurdne
Date:     2012-01-18 12:31:12 +0000 (Wed, 18 Jan 2012)
Log Message:
-----------
controler: fix install script and alter datatype for location_code

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

Modified: trunk/controller/setup/setup.inc.php
===================================================================
--- trunk/controller/setup/setup.inc.php        2012-01-18 12:26:21 UTC (rev 
8602)
+++ trunk/controller/setup/setup.inc.php        2012-01-18 12:31:12 UTC (rev 
8603)
@@ -1,6 +1,6 @@
 <?php
        $setup_info['controller']['name'] = 'controller';
-       $setup_info['controller']['version'] = '0.1.20';
+       $setup_info['controller']['version'] = '0.1.21';
        $setup_info['controller']['app_order'] = 100;
        $setup_info['controller']['enable'] = 1;
        $setup_info['controller']['app_group']  = 'office';
@@ -47,5 +47,8 @@
                'controller_control_area',
                'controller_control_group_list',
                'controller_control_location_list',
-               'controller_control_component_list'
+               'controller_control_component_list',
+               'controller_document',
+               'controller_document_types',
+               'controller_check_item_case'
        );

Modified: trunk/controller/setup/tables_current.inc.php
===================================================================
--- trunk/controller/setup/tables_current.inc.php       2012-01-18 12:26:21 UTC 
(rev 8602)
+++ trunk/controller/setup/tables_current.inc.php       2012-01-18 12:31:12 UTC 
(rev 8603)
@@ -144,7 +144,7 @@
                        'fd' => array(
                                'id' => array('type' => 'auto', 'nullable' => 
false),
                                        'control_id' => array('type' => 'int', 
'precision' => '4', 'nullable' => false),
-                                       'location_code' => array('type' => 
'int', 'precision' => '4', 'nullable' => false)
+                                       'location_code' => array('type' => 
'varchar', 'precision' => '30', 'nullable' => false)
                                ),
                        'pk' => array('id'),
                        'fk' => array(),
@@ -189,7 +189,7 @@
                        'ix' => array(),
                        'uc' => array()
                ),
-               'controller_check_item_case', array(
+               'controller_check_item_case' => array(
                        'fd' => array(
                                'id'                    => array('type' => 
'auto', 'nullable' => false),
                                'check_item_id'         => array('type' => 
'int', 'precision' => '4', 'nullable' => false),
@@ -207,4 +207,4 @@
                 'ix' => array(),
                 'uc' => array()
                )
-       );
\ No newline at end of file
+       );

Modified: trunk/controller/setup/tables_update.inc.php
===================================================================
--- trunk/controller/setup/tables_update.inc.php        2012-01-18 12:26:21 UTC 
(rev 8602)
+++ trunk/controller/setup/tables_update.inc.php        2012-01-18 12:31:12 UTC 
(rev 8603)
@@ -428,4 +428,25 @@
                
                $GLOBALS['setup_info']['controller']['currentver'] = '0.1.20';
                return $GLOBALS['setup_info']['controller']['currentver'];
-       }
\ No newline at end of file
+       }
+
+       $test[] = '0.1.20';
+       function controller_upgrade0_1_20()
+       {
+
+               $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+               //Drop and reinsert because og the datatype int can't be 
altered to varchar
+               
$GLOBALS['phpgw_setup']->oProc->DropColumn('controller_control_location_list', 
array(), 'location_code');
+
+               
$GLOBALS['phpgw_setup']->oProc->AddColumn('controller_control_location_list','location_code',array(
+                       'type' => 'varchar',
+                       'precision' => 30,
+                       'nullable' => false
+               ));
+
+               if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+               {
+                       $GLOBALS['setup_info']['controller']['currentver'] = 
'0.1.21';
+                       return 
$GLOBALS['setup_info']['controller']['currentver'];
+               }               
+       }




reply via email to

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