function hook_update_last_removed

Same name in other branches
  1. 7.x modules/system/system.api.php \hook_update_last_removed()
  2. 9 core/lib/Drupal/Core/Extension/module.api.php \hook_update_last_removed()
  3. 10 core/lib/Drupal/Core/Extension/module.api.php \hook_update_last_removed()
  4. 11.x core/lib/Drupal/Core/Extension/module.api.php \hook_update_last_removed()

Return a number which is no longer available as hook_update_N().

If you remove some update functions from your mymodule.install file, you should notify Drupal of those missing functions. This way, Drupal can ensure that no update is accidentally skipped.

Implementations of this hook should be placed in a mymodule.install file in the same directory as mymodule.module.

Return value

An integer, corresponding to hook_update_N() which has been removed from mymodule.install.

See also

hook_update_N()

Related topics

3 functions implement hook_update_last_removed()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

update_script_test_update_last_removed in core/modules/system/tests/modules/update_script_test/update_script_test.install
Implements hook_update_last_removed().
update_test_last_removed_update_last_removed in core/modules/system/tests/modules/update_test_last_removed/update_test_last_removed.install
Implements hook_update_last_removed().
update_test_with_7x_update_last_removed in core/modules/system/tests/modules/update_test_with_7x/update_test_with_7x.install
Implements hook_update_last_removed().
3 invocations of hook_update_last_removed()
ModuleInstaller::install in core/lib/Drupal/Core/Extension/ModuleInstaller.php
Installs a given list of modules.
system_requirements in core/modules/system/system.install
Implements hook_requirements().
_update_fix_missing_schema in core/includes/update.inc
Helper to detect and fix 'missing' schema information.

File

core/lib/Drupal/Core/Extension/module.api.php, line 867

Code

function hook_update_last_removed() {
    // We've removed the 8.x-1.x version of mymodule, including database updates.
    // The next update function is mymodule_update_8200().
    return 8103;
}

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