/[drupal]/contributions/modules/bio/bio.install
ViewVC logotype

Diff of /contributions/modules/bio/bio.install

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.2, Sat Apr 11 01:32:10 2009 UTC revision 1.3, Sat Apr 11 01:41:11 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: bio.install,v 1.1.2.6 2008/03/25 16:09:44 dww Exp $  // $Id: bio.install,v 1.2 2009/04/11 01:32:10 vauxia Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 84  function bio_update_5100() { Line 84  function bio_update_5100() {
84          uid int unsigned NOT NULL default '0',          uid int unsigned NOT NULL default '0',
85          PRIMARY KEY (nid, uid)          PRIMARY KEY (nid, uid)
86        ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");        ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
87          $ret[] = update_sql("ALTER TABLE {bio} ADD INDEX (uid)");
88        break;        break;
89      case 'pgsql':      case 'pgsql':
90        $ret[] = update_sql("CREATE TABLE {bio} (        $ret[] = update_sql("CREATE TABLE {bio} (
# Line 91  function bio_update_5100() { Line 92  function bio_update_5100() {
92          uid int_unsigned NOT NULL default '0',          uid int_unsigned NOT NULL default '0',
93          PRIMARY KEY (nid, uid)          PRIMARY KEY (nid, uid)
94        )");        )");
95          $ret[] = update_sql("CREATE INDEX uid_idx ON {bio} (uid)");
96        break;        break;
97    }    }
98    
# Line 101  function bio_update_5100() { Line 103  function bio_update_5100() {
103    return $ret;    return $ret;
104  }  }
105    
106    /**
107     * Creates an index on the uid column of the bio table
108     **/
109    function bio_update_5101() {
110      $ret = array();
111    
112      switch ($GLOBALS['db_type']) {
113        case 'mysql':
114        case 'mysqli':
115          $ret[] = update_sql("ALTER TABLE {bio} ADD INDEX (uid)");
116          break;
117        case 'pgsql':
118          $ret[] = update_sql("CREATE INDEX uid_idx ON {bio} (uid)");
119          break;
120      }
121    
122      return $ret;
123    }
124    
125    
126  /**  /**
127   * @} End of "defgroup bio-updates-5.x-1.x"   * @} End of "defgroup bio-updates-5.x-1.x"
128   */   */

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.2