[Database version 1520] Reset user.parent-uid to null if it is set to zero

pull/13169/head
Hypolite Petovan 2023-05-27 18:19:41 -04:00
rodzic fc09017dd1
commit 0a738c8ce3
3 zmienionych plików z 10 dodań i 2 usunięć

Wyświetl plik

@ -1,6 +1,6 @@
-- ------------------------------------------
-- Friendica 2023.09-dev (Giant Rhubarb)
-- DB_UPDATE_VERSION 1519
-- DB_UPDATE_VERSION 1520
-- ------------------------------------------

Wyświetl plik

@ -54,8 +54,9 @@
use Friendica\Database\DBA;
// This file is required several times during the test in DbaDefinition which justifies this condition
if (!defined('DB_UPDATE_VERSION')) {
define('DB_UPDATE_VERSION', 1519);
define('DB_UPDATE_VERSION', 1520);
}
return [

Wyświetl plik

@ -1326,3 +1326,10 @@ function update_1518()
return Update::SUCCESS;
}
function update_1520(): int
{
DBA::update('user', ['parent-uid' => null], ['parent-uid' => 0]);
return Update::SUCCESS;
}