hook_schema

function hook_schema

hook_schema()

Define the current version of the database schema.

A Drupal schema definition is an array structure representing one or more tables and their related keys and indexes. A schema is defined by hook_schema() which must live in your module's .install file.

This hook is called at install and uninstall time, and in the latter case, it cannot rely on the .module file being loaded or hooks being known. If the .module file is needed, it may be loaded with drupal_load().

The tables declared by this hook will be automatically created when the module is first