friendica-github/src/Worker/DBUpdate.php

21 lines
434 B
PHP
Raw Normal View History

2017-11-18 07:31:33 +00:00
<?php
/**
* @file src/Worker/DBUpdate.php
2020-01-19 06:05:23 +00:00
* This file is called when the database structure needs to be updated
2017-11-18 07:31:33 +00:00
*/
namespace Friendica\Worker;
use Friendica\Core\Update;
use Friendica\DI;
2017-11-18 07:31:33 +00:00
class DBUpdate
{
public static function execute()
{
// Just in case the last update wasn't failed
if (DI::config()->get('system', 'update', Update::SUCCESS, true) != Update::FAILED) {
Update::run(DI::app()->getBasePath());
}
2017-11-18 07:31:33 +00:00
}
}