friendica/src/Worker/DBUpdate.php

21 lines
462 B
PHP
Raw Normal View History

2017-11-18 08:31:33 +01:00
<?php
/**
* @file src/Worker/DBUpdate.php
* @brief This file is called when the database structure needs to be updated
*/
namespace Friendica\Worker;
use Friendica\Core\Config;
class DBUpdate {
public static function execute() {
2017-11-19 00:46:16 +01:00
$a = get_app();
2017-11-18 08:31:33 +01:00
// We are deleting the latest dbupdate entry.
// This is done to avoid endless loops because the update was interupted.
Config::delete('database', 'dbupdate_'.DB_UPDATE_VERSION);
update_db($a);
}
}