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
|
2020-02-09 16:18:46 +01:00
|
|
|
|
2017-11-18 07:31:33 +00:00
|
|
|
namespace Friendica\Worker;
|
|
|
|
|
2018-10-06 00:53:13 +02:00
|
|
|
use Friendica\Core\Update;
|
2019-12-15 22:34:11 +01:00
|
|
|
use Friendica\DI;
|
2017-11-18 07:31:33 +00:00
|
|
|
|
2020-02-09 16:18:46 +01:00
|
|
|
/**
|
|
|
|
* This file is called when the database structure needs to be updated
|
|
|
|
*/
|
2019-12-15 23:28:01 +01:00
|
|
|
class DBUpdate
|
2018-07-09 22:39:59 -04:00
|
|
|
{
|
|
|
|
public static function execute()
|
|
|
|
{
|
2019-03-24 22:51:30 +01:00
|
|
|
// 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) {
|
2024-11-10 10:57:13 +00:00
|
|
|
Update::run(DI::apphelper()->getBasePath());
|
2019-03-24 22:51:30 +01:00
|
|
|
}
|
2017-11-18 07:31:33 +00:00
|
|
|
}
|
|
|
|
}
|