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

Contents of /contributions/modules/connect/connect.install

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


Revision 1.2 - (show annotations) (download) (as text)
Fri Apr 3 16:13:28 2009 UTC (7 months, 3 weeks ago) by stevem
Branch: MAIN
CVS Tags: DRUPAL-5--2-0-BETA1, HEAD
Changes since 1.1: +23 -0 lines
File MIME type: text/x-php
many changes; moving source control to Drupal CVS from local SVN
1 <?php
2 // $Id$
3
4 /**
5 * Implementation of hook_uninstall().
6 */
7 function connect_uninstall() {
8 db_query('DROP TABLE {connect_data};');
9 db_query('DROP TABLE {connect_cache};');
10 db_query('DELETE FROM {variable} WHERE name LIKE \'connect_%\';');
11 }
12
13 /**
14 * Implementation of hook_install().
15 */
16 function connect_install() {
17 switch ($GLOBALS['db_type']) {
18 case 'mysql':
19 case 'mysqli':
20 db_query( "CREATE TABLE {connect_data} (
21 id int(11) NOT NULL auto_increment,
22 nid int(10) unsigned NOT NULL default '0',
23 pid int(10) unsigned NOT NULL default '0',
24 PRIMARY KEY (id)
25 ) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */"
26 );
27 break;
28 }
29 }
30
31 /**
32 *
33 */
34
35 function connect_update_1() {
36 switch ($GLOBALS['db_type']) {
37 case 'mysql':
38 case 'mysqli':
39 db_query( "CREATE TABLE {connect_cache} (
40 id int(11) NOT NULL auto_increment,
41 type varchar(64) NOT NULL default '',
42 source varchar(128) NOT NULL default '',
43 target TEXT NOT NULL,
44 created int(11) NOT NULL default '0',
45 PRIMARY KEY (id)
46 ) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */"
47 );
48 break;
49 }
50 }
51

  ViewVC Help
Powered by ViewVC 1.1.2