friendica/src/Worker/DBUpdate.php

21 lines
434 B
PHP
Raw Normal View History

2017-11-18 08:31:33 +01:00
<?php
/**
* @file src/Worker/DBUpdate.php
2020-01-19 07:05:23 +01:00
* This file is called when the database structure needs to be updated
2017-11-18 08:31:33 +01:00
*/
namespace Friendica\Worker;
use Friendica\Core\Update;
use Friendica\DI;
2017-11-18 08:31:33 +01: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 08:31:33 +01:00
}
}