What hook functions are generally included in .install file?
In Drupal, when you want to install a custom module, you must have a mycustommodule.install file. Implementations of the hooks below should be placed in a mycustommodule.install file in the same directory as mycustommodule.module. Some hooks are optional depends on how large your module is. For example, if your module doesn’t require any database table or variable, you wouldn’t have hook_schema in your .install file.
hook_disable | Perform necessary actions before module is disabled. |
hook_enable | Perform necessary actions after module is enabled. |
hook_install | Install the current version of the database schema, and any other setup tasks. |
hook_requirements | Check installation requirements and do status reporting |
hook_schema | Define the current version of the database schema. |
hook_uninstall | Remove any tables or variables that the module sets. |
hook_update_last_removed | Return a number which is no longer available as hook_update_N(). |
hook_update_N | Perform a single update. |