function _drupal_initialize_schema in Schema 5
Fill in required default values for table definitions returned by hook_schema(). Copied from D6.
Parameters
$module: The module for which hook_schema() was invoked.
$schema: The schema definition array as it was returned by the module's hook_schema().
1 call to _drupal_initialize_schema()
- drupal_get_schema in ./
schema_util.inc - Get the schema definition of a table, or the whole database schema. Copied from D6.
File
- ./
schema_util.inc, line 53
Code
function _drupal_initialize_schema($module, &$schema) {
// Set the name and module key for all tables.
foreach ($schema as $name => $table) {
if (empty($table['module'])) {
$schema[$name]['module'] = $module;
}
if (!isset($table['name'])) {
$schema[$name]['name'] = $name;
}
}
}