Moved the functions update_db and run_update_function to a Friendica\Core\Update class

This commit is contained in:
Philipp Holzer 2018-10-06 00:53:13 +02:00
parent c6ce9ddaa4
commit e876adef8f
No known key found for this signature in database
GPG key ID: 517BE60E2CE5C8A5
4 changed files with 130 additions and 7 deletions

View file

@ -6,17 +6,16 @@
namespace Friendica\Worker;
use Friendica\Core\Config;
use Friendica\Core\Update;
class DBUpdate
{
public static function execute()
{
$a = \Friendica\BaseObject::getApp();
// We are deleting the latest dbupdate entry.
// This is done to avoid endless loops because the update was interupted.
Config::delete('database', 'dbupdate_'.DB_UPDATE_VERSION);
update_db($a);
Update::run();
}
}