drupal_install_schema

  1. drupal
    1. drupal6
    2. drupal7
Versionen
drupal6 – drupal7 drupal_install_schema($module)

Create all tables that a module defines in its 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.

Übergabeparameter

$module The module for which the tables will be created.

Rückgabewert

An array of arrays with the following key/value pairs:

  • success: a boolean indicating whether the query succeeded.
  • query: the SQL query(s) executed, passed through check_plain().

Verwandte Themen

▾ 27 functions call drupal_install_schema()

aggregator_install in modules/aggregator/aggregator.install
Implementation of hook_install().
block_install in modules/block/block.install
Implementation of hook_install().
blogapi_install in modules/blogapi/blogapi.install
Implementation of hook_install().
book_install in modules/book/book.install
Implementation of hook_install().
comment_install in modules/comment/comment.install
Implementation of hook_install().
contact_install in modules/contact/contact.install
Implementation of hook_install().
database_test_install in modules/simpletest/tests/database_test.install
Implementation of hook_install().
dblog_install in modules/dblog/dblog.install
Implementation of hook_install().
field_install in modules/field/field.install
Implementation of hook_install().
field_sql_storage_install in modules/field/modules/field_sql_storage/field_sql_storage.install
Implementation of hook_install().
field_test_install in modules/simpletest/tests/field_test.install
Implementation of hook_install().
forum_install in modules/forum/forum.install
Implementation of hook_install().
hook_install in modules/system/system.api.php
Install the current version of the database schema, and any other setup tasks.
locale_install in modules/locale/locale.install
Implementation of hook_install().
menu_install in modules/menu/menu.install
Implementation of hook_install().
openid_install in modules/openid/openid.install
Implementation of hook_install().
poll_install in modules/poll/poll.install
Implementation of hook_install().
profile_install in modules/profile/profile.install
Implementation of hook_install().
search_install in modules/search/search.install
Implementation of hook_install().
simpletest_install in modules/simpletest/simpletest.install
Implementation of hook_install().
statistics_install in modules/statistics/statistics.install
Implementation of hook_install().
system_install in modules/system/system.install
Implementation of hook_install().
taxonomy_install in modules/taxonomy/taxonomy.install
Implementation of hook_install().
taxonomy_test_install in modules/simpletest/tests/taxonomy_test.install
Implementation of hook_install().
trigger_install in modules/trigger/trigger.install
Implementation of hook_install().
update_install in modules/update/update.install
Implementation of hook_install().
upload_install in modules/upload/upload.install
Implementation of hook_install().

Code

includes/common.inc, line 4044

<?php
function drupal_install_schema($module) {
  $schema = drupal_get_schema_unprocessed($module);
  _drupal_initialize_schema($module, $schema);

  $ret = array();
  foreach ($schema as $name => $table) {
    db_create_table($ret, $name, $table);
  }
  return $ret;
}
?>

Kommentare

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen