public function ModuleUpdater::getSchemaUpdates in Drupal 7
Return available database schema updates one a new version is installed.
File
- modules/
system/ system.updater.inc, line 54 - Subclasses of the Updater class to update Drupal core knows how to update. At this time, only modules and themes are supported.
Class
- ModuleUpdater
- Class for updating modules using FileTransfer classes via authorize.php.
Code
public function getSchemaUpdates() {
require_once DRUPAL_ROOT . '/includes/install.inc';
require_once DRUPAL_ROOT . '/includes/update.inc';
if (_update_get_project_type($project) != 'module') {
return array();
}
module_load_include('install', $project);
if (!($updates = drupal_get_schema_versions($project))) {
return array();
}
$updates_to_run = array();
$modules_with_updates = update_get_update_list();
if ($updates = $modules_with_updates[$project]) {
if ($updates['start']) {
return $updates['pending'];
}
}
return array();
}