Use install file for 4.7.0
peterx - September 25, 2006 - 11:44
| Project: | Taxonomy assoc |
| Version: | HEAD |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Description
Add something like the following as taxonomy_assoc.install for 4.7.0.
<?php
/**
* Implementation of hook_install()
*/
function taxonomy_assoc_install()
{
global $db_type;
switch ($db_type)
{
case 'mysql':
case 'mysqli':
db_query("create table taxonomy_assoc (
txnid int(10) unsigned not null auto_increment,
nid int(10) unsigned not null default 0,
tid int(10) unsigned not null default 0,
primary key (txnid),
key txn_nid (nid),
key txn_tid (tid)
) type=myisam;");
break;
}
drupal_set_message(t('All tables required by the bookreview module have been created.'));
}
?>The actual table should eventually be converted to just nid and tid as dual primary keys.
