function drupal_set_installed_schema_version

Same name in other branches
  1. 7.x includes/install.inc \drupal_set_installed_schema_version()
  2. 8.9.x core/includes/schema.inc \drupal_set_installed_schema_version()

Updates the installed version information for a module.

Parameters

string $module: A module name.

string $version: The new schema version.

Deprecated

in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Drupal\Core\Update\UpdateHookRegistry::setInstalledVersion() instead.

See also

https://www.drupal.org/node/2444417

\Drupal\Core\Update\UpdateHookRegistry::setInstalledVersion()

Related topics

1 call to drupal_set_installed_schema_version()
UpdateDeprecationTest::testDrupalGetInstalledSchemaVersion in core/tests/Drupal/KernelTests/Core/Extension/UpdateDeprecationTest.php
Deprecation testing for drupal installed schema version functions.

File

core/includes/schema.inc, line 95

Code

function drupal_set_installed_schema_version($module, $version) {
    @trigger_error('drupal_set_installed_schema_version() is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \\Drupal\\Core\\Update\\UpdateHookRegistry::setInstalledVersion() instead. See https://www.drupal.org/node/2444417', E_USER_DEPRECATED);
    \Drupal::service('update.update_hook_registry')->setInstalledVersion($module, $version);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.