]> git.mxchange.org Git - friendica.git/blob - src/Worker/DBUpdate.php
5f85c8ebefbd2ffb00a39cf477a3f0f2b742991c
[friendica.git] / src / Worker / DBUpdate.php
1 <?php
2 /**
3  * @file src/Worker/DBUpdate.php
4  * @brief This file is called when the database structure needs to be updated
5  */
6 namespace Friendica\Worker;
7
8 use Friendica\Core\Config;
9
10 class DBUpdate {
11         public static function execute() {
12                 $a = get_app();
13
14                 // We are deleting the latest dbupdate entry.
15                 // This is done to avoid endless loops because the update was interupted.
16                 Config::delete('database', 'dbupdate_'.DB_UPDATE_VERSION);
17
18                 update_db($a);
19         }
20 }