[ Index ]
 

Code source de eGroupWare 1.2.106-2

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/bookmarks/setup/ -> tables_update.inc.php (source)

   1  <?php
   2    /**************************************************************************\
   3    * eGroupWare - Setup                                                       *
   4    * http://www.egroupware.org                                                *
   5    * --------------------------------------------                             *
   6    *  This program is free software; you can redistribute it and/or modify it *
   7    *  under the terms of the GNU General Public License as published by the   *
   8    *  Free Software Foundation; either version 2 of the License, or (at your  *
   9    *  option) any later version.                                              *
  10    \**************************************************************************/
  11  
  12    /**************************************************************************\
  13    * This file should be generated for you. It should never be edited by hand *
  14    \**************************************************************************/
  15  
  16    /* $Id: tables_update.inc.php 20295 2006-02-15 12:31:25Z  $ */
  17  
  18      $test[] = '0.8.1';
  19  	function bookmarks_upgrade0_8_1()
  20      {
  21          $GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_bookmarks','bm_owner', array('type' => 'int', 'precision' => 4,'nullable' => True));
  22          $GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_bookmarks','bm_category', array('type' => 'int', 'precision' => 4,'nullable' => True));
  23          $GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_bookmarks','bm_subcategory', array('type' => 'int', 'precision' => 4,'nullable' => True));
  24          $GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_bookmarks','bm_rating', array('type' => 'int', 'precision' => 4,'nullable' => True));
  25          $GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_bookmarks','bm_visits', array('type' => 'int', 'precision' => 4,'nullable' => True));
  26  
  27          return $GLOBALS['setup_info']['bookmarks']['currentver'] = '0.8.2';
  28      }
  29  
  30      $test[] = '0.8.2';
  31  	function bookmarks_upgrade0_8_2()
  32      {
  33          $GLOBALS['egw_setup']->oProc->query("update phpgw_bookmarks SET bm_category = bm_subcategory WHERE bm_subcategory != 0");
  34  
  35          $newtbldef = array(
  36              'fd' => array(
  37                  'bm_id' => array('type' => 'auto','nullable' => False),
  38                  'bm_owner' => array('type' => 'int', 'precision' => 4,'nullable' => True),
  39                  'bm_access' => array('type' => 'varchar', 'precision' => 255,'nullable' => True),
  40                  'bm_url' => array('type' => 'varchar', 'precision' => 255,'nullable' => True),
  41                  'bm_name' => array('type' => 'varchar', 'precision' => 255,'nullable' => True),
  42                  'bm_desc' => array('type' => 'varchar', 'precision' => 255,'nullable' => True),
  43                  'bm_keywords' => array('type' => 'varchar', 'precision' => 255,'nullable' => True),
  44                  'bm_category' => array('type' => 'int', 'precision' => 4,'nullable' => True),
  45                  'bm_rating' => array('type' => 'int', 'precision' => 4,'nullable' => True),
  46                  'bm_info' => array('type' => 'varchar', 'precision' => 255,'nullable' => True),
  47                  'bm_visits' => array('type' => 'int', 'precision' => 4,'nullable' => True)
  48              ),
  49              'pk' => array('bm_id'),
  50              'fk' => array(),
  51              'ix' => array(),
  52              'uc' => array()
  53          );
  54          $GLOBALS['egw_setup']->oProc->DropColumn('phpgw_bookmarks',$newtbldef,'bm_subcategory');
  55  
  56          return $setup_info['bookmarks']['currentver'] = '0.9.1';
  57      }
  58  
  59      $test[] = '0.9.1';
  60  	function bookmarks_upgrade0_9_1()
  61      {
  62          $GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_bookmarks','bm_desc',array('type' => 'text', 'nullable' => True));
  63  
  64          return $setup_info['bookmarks']['currentver'] = '0.9.2';
  65      }
  66  
  67      $test[] = '0.9.2';
  68  	function bookmarks_upgrade0_9_2()
  69      {
  70          return $setup_info['bookmarks']['currentver'] = '1.0.0';
  71      }
  72  
  73      $test[] = '1.0.0';
  74  	function bookmarks_upgrade1_0_0()
  75      {
  76          $GLOBALS['egw_setup']->oProc->RenameTable('phpgw_bookmarks','egw_bookmarks');
  77  
  78          return $setup_info['bookmarks']['currentver'] = '1.2';
  79      }


Généré le : Sun Feb 25 17:20:01 2007 par Balluche grâce à PHPXref 0.7