fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [16744] alter column


From: sigurdne
Subject: [Fmsystem-commits] [16744] alter column
Date: Tue, 16 May 2017 17:18:39 -0400 (EDT)

Revision: 16744
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16744
Author:   sigurdne
Date:     2017-05-16 17:18:39 -0400 (Tue, 16 May 2017)
Log Message:
-----------
alter column

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

Modified: trunk/property/setup/setup.inc.php
===================================================================
--- trunk/property/setup/setup.inc.php  2017-05-15 12:43:38 UTC (rev 16743)
+++ trunk/property/setup/setup.inc.php  2017-05-16 21:18:39 UTC (rev 16744)
@@ -11,7 +11,7 @@
         * @version $Id$
        */
        $setup_info['property']['name']                 = 'property';
-       $setup_info['property']['version']              = '0.9.17.712';
+       $setup_info['property']['version']              = '0.9.17.713';
        $setup_info['property']['app_order']    = 8;
        $setup_info['property']['enable']               = 1;
        $setup_info['property']['app_group']    = 'office';
@@ -68,6 +68,7 @@
 
 
        $setup_info['property']['tables'] = array(
+               'fm_district',
                'fm_part_of_town',
                'fm_gab_location',
                'fm_streetaddress',
@@ -75,7 +76,6 @@
                'fm_tenant_category',
                'fm_vendor',
                'fm_vendor_category',
-               'fm_district',
                'fm_locations',
                'fm_location1_category',
                'fm_location1',

Modified: trunk/property/setup/tables_current.inc.php
===================================================================
--- trunk/property/setup/tables_current.inc.php 2017-05-15 12:43:38 UTC (rev 
16743)
+++ trunk/property/setup/tables_current.inc.php 2017-05-16 21:18:39 UTC (rev 
16744)
@@ -11,14 +11,24 @@
         * @version $Id$
        */
        $phpgw_baseline = array(
+               'fm_district' => array(
+                       'fd' => array(
+                               'id' => array('type' => 'int', 'precision' => 
'2', 'nullable' => False),
+                               'descr' => array('type' => 'varchar', 
'precision' => '50', 'nullable' => True)
+                       ),
+                       'pk' => array('id'),
+                       'fk' => array(),
+                       'ix' => array(),
+                       'uc' => array()
+               ),
                'fm_part_of_town' => array(
                        'fd' => array(
                                'id' => array('type' => 'auto', 'precision' => 
'2', 'nullable' => False),
-                               'name' => array('type' => 'varchar', 
'precision' => '20', 'nullable' => True),
-                               'district_id' => array('type' => 'int', 
'precision' => '2', 'nullable' => True)
+                               'name' => array('type' => 'varchar', 
'precision' => '150', 'nullable' => false),
+                               'district_id' => array('type' => 'int', 
'precision' => '2', 'nullable' => false)
                        ),
                        'pk' => array('id'),
-                       'fk' => array(),
+                       'fk' => array('fm_district' => array('district_id' => 
'id')),
                        'ix' => array(),
                        'uc' => array()
                ),
@@ -114,16 +124,6 @@
                        'ix' => array(),
                        'uc' => array()
                ),
-               'fm_district' => array(
-                       'fd' => array(
-                               'id' => array('type' => 'int', 'precision' => 
'2', 'nullable' => False),
-                               'descr' => array('type' => 'varchar', 
'precision' => '20', 'nullable' => True)
-                       ),
-                       'pk' => array('id'),
-                       'fk' => array(),
-                       'ix' => array(),
-                       'uc' => array()
-               ),
                'fm_standard_unit' => array(
                        'fd' => array(
                                'id' => array('type' => 'int', 'precision' => 
4, 'nullable' => False),

Modified: trunk/property/setup/tables_update.inc.php
===================================================================
--- trunk/property/setup/tables_update.inc.php  2017-05-15 12:43:38 UTC (rev 
16743)
+++ trunk/property/setup/tables_update.inc.php  2017-05-16 21:18:39 UTC (rev 
16744)
@@ -9545,3 +9545,22 @@
                        return $GLOBALS['setup_info']['property']['currentver'];
                }
        }
+
+       /**
+       * Update property version from 0.9.17.712 to 0.9.17.713
+       *
+       */
+       $test[] = '0.9.17.712';
+
+       function property_upgrade0_9_17_712()
+       {
+               $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+               $GLOBALS['phpgw_setup']->oProc->AlterColumn('fm_part_of_town', 
'name', array('type' => 'varchar', 'precision' => '150', 'nullable' => false));
+
+               if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+               {
+                       $GLOBALS['setup_info']['property']['currentver'] = 
'0.9.17.713';
+                       return $GLOBALS['setup_info']['property']['currentver'];
+               }
+       }




reply via email to

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