summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorJennifer Hodgdon <yahgrp@poplarware.com>2013-08-13 07:57:18 -0700
committerJennifer Hodgdon <yahgrp@poplarware.com>2013-08-13 07:57:18 -0700
commit493eb8f292784e3ea9855ef61d6cf5153e024b68 (patch)
treee74ff0135bed4b0279caca1074a98c5624336a7c /modules
parent83c329fc8975d7a89b1cbc2d827fd8aea7b617bd (diff)
downloadbrdo-493eb8f292784e3ea9855ef61d6cf5153e024b68.tar.gz
brdo-493eb8f292784e3ea9855ef61d6cf5153e024b68.tar.bz2
Issue #2061843 by TravisCarden: Clean up the docs for hook_schema
Diffstat (limited to 'modules')
-rw-r--r--modules/system/system.api.php28
1 files changed, 15 insertions, 13 deletions
diff --git a/modules/system/system.api.php b/modules/system/system.api.php
index 2c529d480..f6fb47ca7 100644
--- a/modules/system/system.api.php
+++ b/modules/system/system.api.php
@@ -3098,37 +3098,39 @@ function hook_requirements($phase) {
/**
* 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
+ * 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().
+ * 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 enabled, and removed when the module is uninstalled.
- * This happens before hook_install() is invoked, and after hook_uninstall()
- * is invoked, respectively.
+ * 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.
+ * See the Schema API Handbook at http://drupal.org/node/146843 for details on
+ * schema definition structures.
*
- * @return
+ * @return array
* A schema definition structure array. For each element of the
* array, the key is a table name and the value is a table structure
* definition.
*
+ * @see hook_schema_alter()
+ *
* @ingroup schemaapi
*/
function hook_schema() {
$schema['node'] = array(
- // example (partial) specification for table "node"
+ // Example (partial) specification for table "node".
'description' => 'The base table for nodes.',
'fields' => array(
'nid' => array(