phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] phpgwapi/setup setup.inc.php tables_current.inc...


From: Sigurd Nes
Subject: [Phpgroupware-cvs] phpgwapi/setup setup.inc.php tables_current.inc...
Date: Sun, 08 Oct 2006 16:47:21 +0000

CVSROOT:        /sources/phpgwapi
Module name:    phpgwapi
Changes by:     Sigurd Nes <sigurdne>   06/10/08 16:47:21

Modified files:
        setup          : setup.inc.php tables_current.inc.php 
                         tables_update.inc.php 

Log message:
        Prepare for custom attributes at different locations within applications

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgwapi/setup/setup.inc.php?cvsroot=phpgwapi&r1=1.77&r2=1.78
http://cvs.savannah.gnu.org/viewcvs/phpgwapi/setup/tables_current.inc.php?cvsroot=phpgwapi&r1=1.66&r2=1.67
http://cvs.savannah.gnu.org/viewcvs/phpgwapi/setup/tables_update.inc.php?cvsroot=phpgwapi&r1=1.95&r2=1.96

Patches:
Index: setup.inc.php
===================================================================
RCS file: /sources/phpgwapi/phpgwapi/setup/setup.inc.php,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -b -r1.77 -r1.78
--- setup.inc.php       3 Oct 2006 14:54:17 -0000       1.77
+++ setup.inc.php       8 Oct 2006 16:47:21 -0000       1.78
@@ -5,14 +5,14 @@
        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
        * @package phpgwapi
        * @subpackage setup
-       * @version $Id: setup.inc.php,v 1.77 2006/10/03 14:54:17 sigurdne Exp $
+       * @version $Id: setup.inc.php,v 1.78 2006/10/08 16:47:21 sigurdne Exp $
        * @internal $Source: /sources/phpgwapi/phpgwapi/setup/setup.inc.php,v $
        */
 
        // Basic information about this app
        $setup_info['phpgwapi']['name']      = 'phpgwapi';
        $setup_info['phpgwapi']['title']     = 'phpgwapi';
-       $setup_info['phpgwapi']['version']   = '0.9.17.507';
+       $setup_info['phpgwapi']['version']   = '0.9.17.508';
        $setup_info['phpgwapi']['versions']['current_header'] = '1.25';
        $setup_info['phpgwapi']['enable']    = 3;
        $setup_info['phpgwapi']['app_order'] = 1;
@@ -56,6 +56,7 @@
                'phpgw_cust_fields',
                'phpgw_cust_field_types',
                'phpgw_cust_field_values',
+               'phpgw_cust_attribute_table',
                'phpgw_cust_attribute',
                'phpgw_cust_choice',
                'phpgw_cust_function',

Index: tables_current.inc.php
===================================================================
RCS file: /sources/phpgwapi/phpgwapi/setup/tables_current.inc.php,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -b -r1.66 -r1.67
--- tables_current.inc.php      3 Oct 2006 14:05:03 -0000       1.66
+++ tables_current.inc.php      8 Oct 2006 16:47:21 -0000       1.67
@@ -5,7 +5,7 @@
        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
        * @package phpgwapi
        * @subpackage setup
-       * @version $Id: tables_current.inc.php,v 1.66 2006/10/03 14:05:03 
Caeies Exp $
+       * @version $Id: tables_current.inc.php,v 1.67 2006/10/08 16:47:21 
sigurdne Exp $
        * @internal $Source: 
/sources/phpgwapi/phpgwapi/setup/tables_current.inc.php,v $
        */
 
@@ -600,10 +600,21 @@
                        'ix' => 
array('cust_field_value_val','cust_field_id','appname','location','rec_id'),
                        'uc' => array()
                ),
-               'phpgw_cust_attribute' => array(
+               'phpgw_cust_attribute_table' => array(
                        'fd' => array(
+                               'table_id' => array('type' => 'auto','nullable' 
=> False),
                                'appname' => array('type' => 
'varchar','precision' => '20','nullable' => False),
                                'location' => array('type' => 
'varchar','precision' => '30','nullable' => False),
+                               'table_name' => array('type' => 
'varchar','precision' => '50','nullable' => False)
+                       ),
+                       'pk' => array('table_id'),
+                       'fk' => array(),
+                       'ix' => array(),
+                       'uc' => array('appname','location')
+               ),
+               'phpgw_cust_attribute' => array(
+                       'fd' => array(
+                               'table_id' => array('type' => 'int','precision' 
=> '4','nullable' => False),
                                'id' => array('type' => 'int','precision' => 
'4','nullable' => False),
                                'column_name' => array('type' => 
'varchar','precision' => '20','nullable' => False),
                                'input_text' => array('type' => 
'varchar','precision' => '50','nullable' => False),
@@ -619,7 +630,7 @@
                                'default_value' => array('type' => 
'varchar','precision' => '20','nullable' => True),
                                'nullable' => array('type' => 
'varchar','precision' => '5','nullable' => True)
                        ),
-                       'pk' => array('appname','location','id'),
+                       'pk' => array('table_id','id'),
                        'fk' => array(),
                        'ix' => array(),
                        'uc' => array()

Index: tables_update.inc.php
===================================================================
RCS file: /sources/phpgwapi/phpgwapi/setup/tables_update.inc.php,v
retrieving revision 1.95
retrieving revision 1.96
diff -u -b -r1.95 -r1.96
--- tables_update.inc.php       3 Oct 2006 14:05:03 -0000       1.95
+++ tables_update.inc.php       8 Oct 2006 16:47:21 -0000       1.96
@@ -5,7 +5,7 @@
        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
        * @package phpgwapi
        * @subpackage setup
-       * @version $Id: tables_update.inc.php,v 1.95 2006/10/03 14:05:03 Caeies 
Exp $
+       * @version $Id: tables_update.inc.php,v 1.96 2006/10/08 16:47:21 
sigurdne Exp $
        * @internal $Source: 
/sources/phpgwapi/phpgwapi/setup/tables_update.inc.php,v $
        */
 
@@ -1416,6 +1416,7 @@
                $GLOBALS['setup_info']['phpgwapi']['currentver'] = '0.9.17.506';
                return $GLOBALS['setup_info']['phpgwapi']['currentver'];
        }
+
        $test[] = '0.9.17.506';
        function phpgwapi_upgrade0_9_17_506()
        {
@@ -1439,4 +1440,57 @@
                $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit();
                return $GLOBALS['setup_info']['phpgwapi']['currentver'];
        }
+
+       $test[] = '0.9.17.507';
+       function phpgwapi_upgrade0_9_17_507()
+       {
+               $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+               
+               
$GLOBALS['phpgw_setup']->oProc->DropTable('phpgw_cust_attribute');
+               
+               $GLOBALS['phpgw_setup']->oProc->CreateTable(
+                       'phpgw_cust_attribute_table', array(
+                               'fd' => array(
+                                       'table_id' => array('type' => 
'auto','nullable' => False),
+                                       'appname' => array('type' => 
'varchar','precision' => '20','nullable' => False),
+                                       'location' => array('type' => 
'varchar','precision' => '30','nullable' => False),
+                                       'table_name' => array('type' => 
'varchar','precision' => '50','nullable' => False)
+                               ),
+                               'pk' => array('table_id'),
+                               'fk' => array(),
+                               'ix' => array(),
+                               'uc' => array('appname','location')
+                               )
+               );
+
+
+               $GLOBALS['phpgw_setup']->oProc->CreateTable(
+                       'phpgw_cust_attribute', array(
+                               'fd' => array(
+                                       'table_id' => array('type' => 
'int','precision' => '4','nullable' => False),
+                                       'id' => array('type' => 
'int','precision' => '4','nullable' => False),
+                                       'column_name' => array('type' => 
'varchar','precision' => '20','nullable' => False),
+                                       'input_text' => array('type' => 
'varchar','precision' => '50','nullable' => False),
+                                       'statustext' => array('type' => 
'varchar','precision' => '150','nullable' => False),
+                                       'datatype' => array('type' => 
'varchar','precision' => '10','nullable' => False),
+                                       'search' => array('type' => 
'int','precision' => '2','nullable' => True),
+                                       'history' => array('type' => 
'int','precision' => '2','nullable' => True),
+                                       'list' => array('type' => 
'int','precision' => '4','nullable' => True),
+                                       'attrib_sort' => array('type' => 
'int','precision' => '4','nullable' => True),
+                                       'size' => array('type' => 
'int','precision' => '4','nullable' => True),
+                                       'precision_' => array('type' => 
'int','precision' => '4','nullable' => True),
+                                       'scale' => array('type' => 
'int','precision' => '4','nullable' => True),
+                                       'default_value' => array('type' => 
'varchar','precision' => '20','nullable' => True),
+                                       'nullable' => array('type' => 
'varchar','precision' => '5','nullable' => True)
+                               ),
+                               'pk' => array('table_id','id'),
+                               'fk' => array(),
+                               'ix' => array(),
+                               'uc' => array()
+                               )
+               );
+               $GLOBALS['setup_info']['phpgwapi']['currentver'] = '0.9.17.508';
+               $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit();
+               return $GLOBALS['setup_info']['phpgwapi']['currentver'];
+       }
 ?>




reply via email to

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