- $build = Core\Config::get('system', 'build');
- if (empty($build)) {
- Core\Config::set('system', 'build', DB_UPDATE_VERSION);
- $build = DB_UPDATE_VERSION;
- }
-
- $stored = intval($build);
- $current = intval(DB_UPDATE_VERSION);
-
- // run the pre_update_nnnn functions in update.php
- for ($x = $stored; $x < $current; $x ++) {
- $r = Update::runUpdateFunction($x, 'pre_update');
- if (!$r) {
- break;
- }
- }
-
- $output = DBStructure::update(true, true);
-
- // run the update_nnnn functions in update.php
- for ($x = $stored; $x < $current; $x ++) {
- $r = Update::runUpdateFunction($x, 'update');
- if (!$r) {
- break;
- }
- }
-
- Core\Config::set('system', 'build', DB_UPDATE_VERSION);
+ $force = $this->getOption(['f', 'force'], false);
+ $override = $this->getOption(['o', 'override'], false);
+ $output = Update::run($a->getBasePath(), $force, $override,true, false);