| 1 |
<?php |
<?php |
| 2 |
// $Id: $ |
// $Id: interests.install,v 1.2 2007/05/12 13:03:31 agileware Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* Implementation of hook_install(). |
* Implementation of hook_install(). |
| 15 |
counter int(10) unsigned NOT NULL DEFAULT '0', |
counter int(10) unsigned NOT NULL DEFAULT '0', |
| 16 |
PRIMARY KEY (uid,tid) |
PRIMARY KEY (uid,tid) |
| 17 |
) /*!40100 DEFAULT CHARACTER SET utf8 */;"); |
) /*!40100 DEFAULT CHARACTER SET utf8 */;"); |
| 18 |
|
$status[] = db_query("CREATE TABLE {interests_vocabs} ( |
| 19 |
|
id int(10) unsigned NOT NULL DEFAULT '0', |
| 20 |
|
vid int(10) unsigned NOT NULL DEFAULT '0', |
| 21 |
|
PRIMARY KEY (vid) |
| 22 |
|
) /*!40100 DEFAULT CHARACTER SET utf8 */;"); |
| 23 |
break; |
break; |
| 24 |
|
|
| 25 |
case 'pgsql': |
case 'pgsql': |
| 29 |
counter integer NOT NULL DEFAULT '0', |
counter integer NOT NULL DEFAULT '0', |
| 30 |
PRIMARY KEY (uid,tid) |
PRIMARY KEY (uid,tid) |
| 31 |
);"); |
);"); |
| 32 |
|
$status[] = db_query("CREATE TABLE {interests_vocabs} ( |
| 33 |
|
id integer NOT NULL DEFAULT '0', |
| 34 |
|
vid integer NOT NULL DEFAULT '0', |
| 35 |
|
PRIMARY KEY (vid) |
| 36 |
|
);"); |
| 37 |
break; |
break; |
| 38 |
} |
} |
| 39 |
|
|
| 50 |
function interests_uninstall(){ |
function interests_uninstall(){ |
| 51 |
if (db_table_exists('interests')) { |
if (db_table_exists('interests')) { |
| 52 |
db_query("DROP TABLE {interests}"); |
db_query("DROP TABLE {interests}"); |
| 53 |
|
db_query("DROP TABLE {interests_vocabs}"); |
| 54 |
} |
} |
| 55 |
} |
} |
| 56 |
|
|