W3cubDocs

/Drupal 8

function drupal_set_installed_schema_version

drupal_set_installed_schema_version($module, $version)

Updates the installed version information for a module.

Parameters

string $module: A module name.

string $version: The new schema version.

Related topics

Schema API
API to handle database schemas.

File

core/includes/schema.inc, line 105
Schema API handling functions.

Code

function drupal_set_installed_schema_version($module, $version) {
  \Drupal::keyValue('system.schema')->set($module, $version);
  // Reset the static cache of module schema versions.
  drupal_get_installed_schema_version(NULL, TRUE);
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!includes!schema.inc/function/drupal_set_installed_schema_version/8.1.x