mirror of
https://github.com/friendica/friendica
synced 2024-12-22 12:40:15 +00:00
[Database version 1520] Reset user.parent-uid to null if it is set to zero
This commit is contained in:
parent
fc09017dd1
commit
0a738c8ce3
3 changed files with 10 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
|||
-- ------------------------------------------
|
||||
-- Friendica 2023.09-dev (Giant Rhubarb)
|
||||
-- DB_UPDATE_VERSION 1519
|
||||
-- DB_UPDATE_VERSION 1520
|
||||
-- ------------------------------------------
|
||||
|
||||
|
||||
|
|
|
@ -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 [
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue