hook_install() doesn't seem to work, even though I have disabled and uninstalled module I'm writing a module that will enable an editor to determine whether a script is available on a specific node, in order to improve page load times. 

I need to create a database table to hold an indicator showing, for each node ID, whether the script is available. My code is this.

function script_show_schema() { 
    $schema['script_show_enabled'] = array(
        'description' =&gt; 'Tracks whether Script Show is enabled for a given node',
        'fields' =&gt; array(
            'nid' =&gt; array(
                'description' =&gt; 'The {node}.nid that has Script Show enabled', 
                'type' =&gt; 'int', 
}               'not null' =&gt; TRUE, 
                'default' =&gt; 0, 
            ),
        ),
        'primary key' =&gt; array('nid'),
    ); 
    return $schema;
}


I've disabled, then uninstalled, then re-enabled my module through the admin UI, (as opposed to using Drush), but I still don't seem to be able to see my database tables. 

I know this question has been asked a couple of times before, but usually the solution seems to be the uninstall thing. 

Does anyone have any idea on what is going wrong? I wonder if it's a DB permissions thing. But then, I guess Drupal has root access to the DB in order to create its tables in the first place. 

Updates:

I am using version 7.23 of the core.

Here's my .info file: 

; $Id$ 
name = Script Show
description = "Allows the user to specify that the Maxymiser script will only execute on specific pages"
package = JD Dev Modules
core = 7.x
files[] = script_show.module


flag


My entire module is here: github.com/jamesdesq/script_show.
The code in your git repo is not the same as the code posted here.  Both has syntax errors.  See @ARUN's answer for the bug in the code posted here.

As for the code in the git repo, there are two lines of random junk in it (indicated with red striketroughs below), causing Drupal to crash before the table is created in the database.



Remove those two lines and try again.