How do I add column to existing table on module installation?
For the sake of giving a (hopefully) complete answer:


You will need to alter the schema of an existing module, signalling the change to the system. So implement hook_schema_alter().
You will need to implement hook_install() to actually add the field to the database.
You will need to implement hook_uninstall() as well, to remove the extra field when the module is uninstalled. You might need to do extra cleanup at this stage.


An example which alters the Webform module's webform_submitted_data table:

function MYMODULE_schema_alter(&amp;$schema) {
  $schema['webform_submitted_data']['fields']['extra'] = array(
    'description' =&gt; 'Some random extra info.',
    'type' =&gt; 'text',
    'size' =&gt; 'big',
  );
}

function MYMODULE_install() {
  db_add_field('webform_submitted_data', 'extra', array(
    'description' =&gt; 'Some random extra info.',
    'type' =&gt; 'text',
    'size' =&gt; 'big',
  ));
}

function MYMODULE_uninstall() {
  db_drop_field('webform_submitted_data', 'extra');
}