"update" is enough

This commit is contained in:
Michael 2017-12-14 22:18:53 +00:00
parent cf56de1e77
commit 2d7cd2daf4
5 changed files with 8 additions and 8 deletions

View File

@ -702,7 +702,7 @@ function update_db(App $a)
// run new update routine
// it update the structure in one call
$retval = DBStructure::updateStructure(false, true);
$retval = DBStructure::update(false, true);
if ($retval) {
DBStructure::updateFail(
DB_UPDATE_VERSION,

View File

@ -722,7 +722,7 @@ function admin_page_summary(App $a)
}
if (Config::get('system', 'dbupdate', DB_UPDATE_NOT_CHECKED) == DB_UPDATE_NOT_CHECKED) {
DBStructure::updateStructure(false, true);
DBStructure::update(false, true);
}
if (Config::get('system', 'dbupdate') == DB_UPDATE_FAILED) {
$showwarning = true;
@ -1385,7 +1385,7 @@ function admin_page_dbsync(App $a)
}
if (($a->argc > 2) && (intval($a->argv[2]) || ($a->argv[2] === 'check'))) {
$retval = DBStructure::updateStructure(false, true);
$retval = DBStructure::update(false, true);
if (!$retval) {
$o .= sprintf(t("Database structure update %s was successfully applied."), DB_UPDATE_VERSION) . "<br />";
Config::set('database', 'dbupdate_' . DB_UPDATE_VERSION, 'success');

View File

@ -536,7 +536,7 @@ function load_database_rem($v, $i) {
}
function load_database() {
$errors = DBStructure::updateStructure(false, true);
$errors = DBStructure::update(false, true);
return $errors;
}

View File

@ -21,10 +21,10 @@ unset($db_host, $db_user, $db_pass, $db_data);
if ($_SERVER["argc"] == 2) {
switch ($_SERVER["argv"][1]) {
case "dryrun":
DBStructure::updateStructure(true, false);
DBStructure::update(true, false);
return;
case "update":
DBStructure::updateStructure(true, true);
DBStructure::update(true, true);
$build = Config::get('system','build');
if (!x($build)) {

View File

@ -182,7 +182,7 @@ class DBStructure {
return t('Errors encountered performing database changes: ').$message.EOL;
}
public static function updateStructure($verbose, $action, $tables = null, $definition = null) {
public static function update($verbose, $action, $tables = null, $definition = null) {
if ($action) {
Config::set('system', 'maintenance', 1);
Config::set('system', 'maintenance_reason', sprintf(t(': Database update'), DBM::date().' '.date('e')));
@ -1686,4 +1686,4 @@ class DBStructure {
return($database);
}
}
}