diff --git a/core/includes/schema.inc b/core/includes/schema.inc index bb1c6e6..9f83423 100644 --- a/core/includes/schema.inc +++ b/core/includes/schema.inc @@ -22,9 +22,6 @@ /** * Gets the schema definition of a table, or the whole database schema. * - * The returned schema will include any modifications made by any - * module that implements hook_schema_alter(). - * * @param string $table * The name of the table. If not given, the schema of all tables is returned. * @param bool $rebuild @@ -54,9 +51,6 @@ function drupal_get_schema($table = NULL, $rebuild = FALSE) { /** * Gets the whole database schema. * - * The returned schema will include any modifications made by any - * module that implements hook_schema_alter(). - * * @param bool $rebuild * If TRUE, the schema will be rebuilt instead of retrieved from the cache. */ @@ -86,7 +80,6 @@ function drupal_get_complete_schema($rebuild = FALSE) { _drupal_schema_initialize($current, $module); $schema = array_merge($schema, $current); } - drupal_alter('schema', $schema); if ($rebuild) { Cache::deleteTags(array('schema' => TRUE)); @@ -198,10 +191,6 @@ function drupal_set_installed_schema_version($module, $version) { /** * Creates all tables defined in a module's hook_schema(). * - * Note: This function does not pass the module's schema through - * hook_schema_alter(). The module's tables will be created exactly as the - * module defines them. - * * @param string $module * The module for which the tables will be created. */ @@ -217,10 +206,6 @@ function drupal_install_schema($module) { /** * Removes all tables defined in a module's hook_schema(). * - * Note: This function does not pass the module's schema through - * hook_schema_alter(). The module's tables will be created exactly as the - * module defines them. - * * @param string $module * The module for which the tables will be removed. * @@ -246,19 +231,12 @@ function drupal_uninstall_schema($module) { * * Use this function only if you explicitly need the original * specification of a schema, as it was defined in a module's - * hook_schema(). No additional default values will be set, - * hook_schema_alter() is not invoked and these unprocessed - * definitions won't be cached. + * hook_schema(). * * This function can be used to retrieve a schema specification in * hook_schema(), so it allows you to derive your tables from existing * specifications. * - * It is also used by drupal_install_schema() and - * drupal_uninstall_schema() to ensure that a module's tables are - * created exactly as specified without any changes introduced by a - * module that implements hook_schema_alter(). - * * @param string $module * The module to which the table belongs. * @param string $table diff --git a/core/modules/system/system.api.php b/core/modules/system/system.api.php index 59dfce0..62726e2 100644 --- a/core/modules/system/system.api.php +++ b/core/modules/system/system.api.php @@ -1961,7 +1961,7 @@ function hook_requirements($phase) { * 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. + * creation of the supported database engines. * * See the Schema API Handbook at http://drupal.org/node/146843 for details on * schema definition structures. @@ -1971,8 +1971,6 @@ function hook_requirements($phase) { * array, the key is a table name and the value is a table structure * definition. * - * @see hook_schema_alter() - * * @ingroup schemaapi */ function hook_schema() { @@ -2032,31 +2030,6 @@ function hook_schema() { } /** - * Perform alterations to existing database schemas. - * - * When a module modifies the database structure of another module (by - * changing, adding or removing fields, keys or indexes), it should - * implement hook_schema_alter() to update the default $schema to take its - * changes into account. - * - * See hook_schema() for details on the schema definition structure. - * - * @param $schema - * Nested array describing the schemas for all modules. - * - * @ingroup schemaapi - */ -function hook_schema_alter(&$schema) { - // Add field to existing schema. - $schema['users']['fields']['timezone_id'] = array( - 'type' => 'int', - 'not null' => TRUE, - 'default' => 0, - 'description' => 'Per-user timezone configuration.', - ); -} - -/** * Perform alterations to a structured query. * * Structured (aka dynamic) queries that have tags associated may be altered by any module