Solution: Ayesh K provides the correct answer below.
What is required to get a custom module to appear in uninstall list? I thought all you had to do was specify a database schema in hook_schema()
, but I've done so and my module does not appear in the uninstall list. Currently my module consists of the following code in the .install
file:
<?php
/**
* Table schema definition for the Events Sponsors module.
*/
function event_sponsors_schema() {
$schema['event_sponsors_sponsors'] = array(
'description' => 'A collection of event sponsors.',
'fields' => array(
'id' => array(
'type' => 'serial',
'not null' => TRUE,
'unsigned' => TRUE,
'description' => "Unique ID for the sponsor.",
),
'name' => array(
'type' => 'varchar',
'length' => '255',
'not null' => TRUE,
'description' => 'The name of the sponsor.',
),
),
'primary key' => array('id'),
'unique keys' => array(
'id' => array('id'),
),
);
$schema['event_sponsors_sponsor_relations'] = array(
'description' => 'Maintains sponsor and node relations.',
'fields' => array(
'sid' => array(
'type' => 'int',
'not null' => TRUE,
'unsigned' => TRUE,
'description' => 'The sponsor ID, as can be found in the sponsors table.',
),
'nid' => array(
'type' => 'int',
'not null' => TRUE,
'unsigned' => TRUE,
'description' => 'The node ID as can be found in the node table.',
),
'ordinal' => array(
'type' => 'int',
'not null' => TRUE,
'unsigned' => TRUE,
'description' => 'The order this sponsor appears alongside the node.',
),
),
'primary keys' => array('sid','nid'),
'unique keys' => array(
'sid' => array('sid'),
'nid' => array('nid'),
),
);
return $schema;
}
Any insight is appreciated.
.install
file).