friendica/src/Worker/DBUpdate.php

21 lines
434 B
PHP
Raw Normal View History

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