Issue #1312844 by sven.lauer: Fixed hook_schema() doc should state that database tables are auto-created.

8.0.x
Nathaniel 2011-10-21 15:05:01 +09:00
parent 1326a44a24
commit 35b88bdaff
1 changed files with 8 additions and 5 deletions

View File

@ -2536,12 +2536,15 @@ function hook_requirements($phase) {
* 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().
*
* By implementing hook_schema() and specifying the tables your module
* declares, you can easily create and drop these tables on all
* supported database engines. You don't have to deal with the
* different SQL dialects for table creation and alteration of the
* supported database engines.
* The tables declared by this hook will be automatically created when
* the module is first enabled, and removed when the module is uninstalled.
* This happens before hook_install() is invoked, and after hook_uninstall()
* is invoked, respectively.
*
* By declaring the tables used by your module via an implementation of
* hook_schema(), these tables will be available on all supported database
* engines. You don't have to deal with the different SQL dialects for table
* creation and alteration of the supported database engines *
* See the Schema API Handbook at http://drupal.org/node/146843 for
* details on schema definition structures.
*