phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: sitemgr/setup setup.inc.php,1.4,1.5 tables_curre


From: Patrick Walsh <address@hidden>
Subject: [Phpgroupware-cvs] CVS: sitemgr/setup setup.inc.php,1.4,1.5 tables_current.inc.php,1.3,1.4 tables_update.inc.php,1.3,1.4
Date: Sat, 07 Sep 2002 01:57:31 -0400

Update of /cvsroot/phpgroupware/sitemgr/setup
In directory subversions:/tmp/cvs-serv5506/setup

Modified Files:
        setup.inc.php tables_current.inc.php tables_update.inc.php 
Log Message:
Made for an automatic upgrade to new categories.


Index: setup.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/sitemgr/setup/setup.inc.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** setup.inc.php       1 Sep 2002 21:47:35 -0000       1.4
--- setup.inc.php       7 Sep 2002 05:57:29 -0000       1.5
***************
*** 13,20 ****
  
        $setup_info['sitemgr']['name']      = 'sitemgr';
!       $setup_info['sitemgr']['title']     = 'Web Content Manager';
        $setup_info['sitemgr']['version']   = '0.9.14.002';
        $setup_info['sitemgr']['app_order'] = 8;
!       $setup_info['sitemgr']['tables']    = 
array('phpgw_sitemgr_pages','phpgw_sitemgr_categories','phpgw_sitemgr_blocks','phpgw_sitemgr_preferences');
        $setup_info['sitemgr']['enable']    = 1;
  
--- 13,20 ----
  
        $setup_info['sitemgr']['name']      = 'sitemgr';
!       $setup_info['sitemgr']['title']     = 'SiteMgr Web Content Manager';
        $setup_info['sitemgr']['version']   = '0.9.14.002';
        $setup_info['sitemgr']['app_order'] = 8;
!       $setup_info['sitemgr']['tables']    = 
array('phpgw_sitemgr_pages','phpgw_sitemgr_blocks','phpgw_sitemgr_preferences');
        $setup_info['sitemgr']['enable']    = 1;
  

Index: tables_current.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/sitemgr/setup/tables_current.inc.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** tables_current.inc.php      1 Sep 2002 21:47:35 -0000       1.3
--- tables_current.inc.php      7 Sep 2002 05:57:29 -0000       1.4
***************
*** 29,45 ****
                        'uc' => array()
                ),
-               'phpgw_sitemgr_categories' => array(
-                       'fd' => array(
-                               'cat_id' => array('type' => 'auto', 'nullable' 
=> false),
-                               'sort_order' => array('type' => 'int', 
'precision' => 4),
-                               'parent' => array('type' => 'int', 'precision' 
=> 4),
-                               'name' => array('type' => 'varchar', 
'precision' => 100),
-                               'description' => array('type' => 'varchar', 
'precision' => 256)
-                       ),
-                       'pk' => array('cat_id'),
-                       'fk' => array(),
-                       'ix' => array(),
-                       'uc' => array()
-               ),
                'phpgw_sitemgr_blocks' => array(
                        'fd' => array(
--- 29,32 ----

Index: tables_update.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/sitemgr/setup/tables_update.inc.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** tables_update.inc.php       1 Sep 2002 21:47:35 -0000       1.3
--- tables_update.inc.php       7 Sep 2002 05:57:29 -0000       1.4
***************
*** 38,40 ****
--- 38,68 ----
                return $setup_info['sitemgr']['currentver'];
        }
+       $test[] = '0.9.14.002';
+       function sitemgr_upgrade0_9_14_002()
+       {
+               /******************************************************\
+               * Purpose of this upgrade is to switch to phpgw        *
+               * categories from the db categories.  So the           *
+               * sql data will be moved to the cat stuff and the sql  *
+               * categories table will be deleted.                    *
+               *                                                      *
+               * It would be nice if we could just run an UPDATE sql  *
+               * query, but then you run the risk of this scenario:   *
+               * old_cat_id = 5, new_cat_id = 2 --> update all pages  *
+               * old_cat_id = 2, new_cat_id = 3 --> update all pages  *
+               *  now all old_cat_id 5 pages are cat_id 3....         *
+               \******************************************************/
+               global $setup_info,$phpgw_setup;
+               $setup_info['sitemgr']['currentver'] = '0.9.14.003';
+ 
+               //$cat_db_so = CreateObject('sitemgr.Categories_db_SO');
+ 
+               //$cat_db_so->convert_to_phpgwapi();
+ 
+               // Finally, delete the categories table
+               //$phpgw_setup->oProc->DropTable('phpgw_sitemgr_categories');
+ 
+               return $setup_info['sitemgr']['currentver'];
+       }
+               
  ?>





reply via email to

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