You are here

function drupal_set_installed_schema_version in Drupal 7

Same name and namespace in other branches
  1. 8 core/includes/schema.inc \drupal_set_installed_schema_version()
  2. 4 includes/install.inc \drupal_set_installed_schema_version()
  3. 5 includes/install.inc \drupal_set_installed_schema_version()
  4. 6 includes/install.inc \drupal_set_installed_schema_version()
  5. 9 core/includes/schema.inc \drupal_set_installed_schema_version()

Update the installed version information for a module.

Parameters

$module: A module name.

$version: The new schema version.

7 calls to drupal_set_installed_schema_version()
drupal_uninstall_modules in includes/install.inc
Uninstalls a given list of disabled modules.
module_enable in includes/module.inc
Enables or installs a given list of modules.
system_install in modules/system/system.install
Implements hook_install().
UpdateScriptFunctionalTest::testRequirements in modules/system/system.test
Tests that requirements warnings and errors are correctly displayed.
UpdateScriptFunctionalTest::testSuccessfulUpdateFunctionality in modules/system/system.test
Tests update.php after performing a successful update.

... See full list

File

includes/install.inc, line 177
API functions for installing modules and themes.

Code

function drupal_set_installed_schema_version($module, $version) {
  db_update('system')
    ->fields(array(
    'schema_version' => $version,
  ))
    ->condition('name', $module)
    ->execute();

  // Reset the static cache of module schema versions.
  drupal_get_installed_schema_version(NULL, TRUE);
}