function drupal_set_installed_schema_version in Drupal 9
Same name and namespace in other branches
- 8 core/includes/schema.inc \drupal_set_installed_schema_version()
- 4 includes/install.inc \drupal_set_installed_schema_version()
- 5 includes/install.inc \drupal_set_installed_schema_version()
- 6 includes/install.inc \drupal_set_installed_schema_version()
- 7 includes/install.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 - Schema API handling functions.
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);
}