function drupal_get_installed_schema_version in Drupal 4
Same name and namespace in other branches
- 8 core/includes/schema.inc \drupal_get_installed_schema_version()
- 5 includes/install.inc \drupal_get_installed_schema_version()
- 6 includes/install.inc \drupal_get_installed_schema_version()
- 7 includes/install.inc \drupal_get_installed_schema_version()
- 9 core/includes/schema.inc \drupal_get_installed_schema_version()
Returns the currently installed schema version for a module.
Parameters
$module: A module name.
Return value
The currently installed schema version.
5 calls to drupal_get_installed_schema_version()
- system_modules_submit in modules/
system.module - update_fix_sessions in ./
update.php - System update 130 changes the sessions table, which breaks the update script's ability to use session variables. This changes the table appropriately.
- update_fix_watchdog in ./
update.php - System update 142 changes the watchdog table, which breaks the update script's ability to use logging. This changes the table appropriately.
- update_fix_watchdog_115 in ./
update.php - System update 115 changes the watchdog table, which breaks the update script's ability to use logging. This changes the table appropriately.
- update_selection_page in ./
update.php
File
- includes/
install.inc, line 52
Code
function drupal_get_installed_schema_version($module, $reset = FALSE) {
static $versions;
if ($reset) {
unset($versions);
}
if (!$versions) {
$versions = array();
$result = db_query("SELECT name, schema_version FROM {system} WHERE type = 'module'");
while ($row = db_fetch_object($result)) {
$versions[$row->name] = $row->schema_version;
}
}
return $versions[$module];
}