mirror of
https://github.com/friendica/friendica
synced 2024-11-11 17:02:57 +00:00
21 lines
462 B
PHP
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());
|
|
}
|
|
}
|
|
}
|