| 1 |
<?php
|
| 2 |
// $Id: acronyms.install,v 1.1 2008/12/05 16:32:48 dellintosh Exp $
|
| 3 |
|
| 4 |
/*
|
| 5 |
* Implementation of hook_install()
|
| 6 |
*/
|
| 7 |
function acronyms_install() {
|
| 8 |
switch ($GLOBALS['db_type']) {
|
| 9 |
case 'mysql':
|
| 10 |
case 'mysqli':
|
| 11 |
db_query("CREATE TABLE {acronyms} (
|
| 12 |
nid int(10) unsigned NOT NULL default '0',
|
| 13 |
vid int(10) unsigned NOT NULL default '0',
|
| 14 |
aid int(10) unsigned NOT NULL default '0',
|
| 15 |
acronym varchar(255) NOT NULL default '',
|
| 16 |
enabled int(1) NOT NULL default '1',
|
| 17 |
PRIMARY KEY (nid, vid, aid)
|
| 18 |
) /*!40100 DEFAULT CHARACTER SET utf8 */");
|
| 19 |
break;
|
| 20 |
}
|
| 21 |
}
|
| 22 |
|
| 23 |
function acronyms_uninstall() {
|
| 24 |
if (db_table_exists('acronyms')) {
|
| 25 |
db_query("DROP TABLE {acronyms}");
|
| 26 |
}
|
| 27 |
}
|