- // We're reporting a different version than what is currently installed.
- // Run any existing update scripts to bring the database up to current.
- // make sure that boot.php and update.php are the same release, we might be
- // updating right this very second and the correct version of the update.php
- // file may not be here yet. This can happen on a very busy site.
-
- if (DB_UPDATE_VERSION == UPDATE_VERSION) {
- // Compare the current structure with the defined structure
-
- $t = Config::get('database', 'dbupdate_' . DB_UPDATE_VERSION);
- if ($t !== false) {
- return;
- }
-
- Config::set('database', 'dbupdate_' . DB_UPDATE_VERSION, time());
-
- // run old update routine (wich could modify the schema and
- // conflits with new routine)
- for ($x = $stored; $x < NEW_UPDATE_ROUTINE_VERSION; $x++) {
- $r = run_update_function($x);
- if (!$r) {
- break;
- }
- }
- if ($stored < NEW_UPDATE_ROUTINE_VERSION) {
- $stored = NEW_UPDATE_ROUTINE_VERSION;
- }
+ // Compare the current structure with the defined structure
+ $t = Config::get('database', 'dbupdate_' . DB_UPDATE_VERSION);
+ if (!is_null($t)) {
+ return;
+ }