What is required to get a custom module to appear in uninstall list? 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:

&lt;?php

/**
 * Table schema definition for the Events Sponsors module.
 */
function event_sponsors_schema() {
    $schema['event_sponsors_sponsors'] = array(
        'description' =&gt; 'A collection of event sponsors.',
        'fields' =&gt; array(
            'id' =&gt; array(
                'type' =&gt; 'serial',
                'not null' =&gt; TRUE,
                'unsigned' =&gt; TRUE,
                'description' =&gt; "Unique ID for the sponsor.",
            ),
            'name' =&gt; array(
                'type' =&gt; 'varchar',
                'length' =&gt; '255',
                'not null' =&gt; TRUE,
                'description' =&gt; 'The name of the sponsor.',
            ),
        ),
        'primary key' =&gt; array('id'),
        'unique keys' =&gt; array(
            'id' =&gt; array('id'),
        ),
    );

    $schema['event_sponsors_sponsor_relations'] = array(
        'description' =&gt; 'Maintains sponsor and node relations.',
        'fields' =&gt; array(
            'sid' =&gt; array(
                'type' =&gt; 'int',
                'not null' =&gt; TRUE,
                'unsigned' =&gt; TRUE,
                'description' =&gt; 'The sponsor ID, as can be found in the sponsors table.',
            ),
            'nid' =&gt; array(
                'type' =&gt; 'int',
                'not null' =&gt; TRUE,
                'unsigned' =&gt; TRUE,
                'description' =&gt; 'The node ID as can be found in the node table.',
            ),
            'ordinal' =&gt; array(
                'type' =&gt; 'int',
                'not null' =&gt; TRUE,
                'unsigned' =&gt; TRUE,
                'description' =&gt; 'The order this sponsor appears alongside the node.',
            ),
        ),
        'primary keys' =&gt; array('sid','nid'),
        'unique keys' =&gt; array(
            'sid' =&gt; array('sid'),
            'nid' =&gt; array('nid'),
        ),
    );

    return $schema;
}


Any insight is appreciated.
For Drupal 6, you needed to install/uninstall schema using hook_install and hook_uninstall. 

This is not necessary for Drupal 7. 

Module will appear in uninstall list if both of these conditions are met:


module implements hook_schema OR hook_uninstall in its .install file. 
module was enabled once and now is in disabled status. 


If the only purpose of hook_uninstall is to uninstall the schema, you do not need a hook_uninstall function. For variable_del(), etc: you need. 
If you have any of these and module has data in the site already, you will see the uninstall check box.