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

This commit is contained in:
Hypolite Petovan 2023-05-27 18:19:41 -04:00
parent fc09017dd1
commit 0a738c8ce3
3 changed files with 10 additions and 2 deletions

View File

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

View File

@ -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 [

View File

@ -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;
}