friendica-github/src/Worker/DBUpdate.php
2019-12-29 20:17:38 +01:00

21 lines
462 B
PHP

<?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;
use Friendica\Core\Update;
use Friendica\DI;
class DBUpdate
{
public static function execute()
{
// Just in case the last update wasn't failed
if (Config::get('system', 'update', Update::SUCCESS, true) != Update::FAILED) {
Update::run(DI::app()->getBasePath());
}
}
}