friendica-github/src/Worker/DBUpdate.php

26 lines
561 B
PHP
Raw Normal View History

2017-11-18 07:31:33 +00:00
<?php
2024-08-24 15:27:00 +02:00
// Copyright (C) 2010-2024, the Friendica project
// SPDX-FileCopyrightText: 2010-2024 the Friendica project
//
// SPDX-License-Identifier: AGPL-3.0-or-later
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
/**
* This file is called when the database structure needs to be updated
*/
class DBUpdate
{
public static function execute()
{
// Just in case the last update wasn't failed
2022-12-28 02:07:38 +01:00
if (DI::config()->get('system', 'update', Update::SUCCESS) != Update::FAILED) {
Update::run(DI::appHelper()->getBasePath());
}
2017-11-18 07:31:33 +00:00
}
}