mirror of
https://github.com/friendica/friendica
synced 2024-12-23 00:00:21 +00:00
[Database version 1375] Add update method to populate missing item.thr-parent values
This commit is contained in:
parent
2e7c505ac0
commit
c98da63041
2 changed files with 10 additions and 1 deletions
|
@ -54,7 +54,7 @@
|
||||||
use Friendica\Database\DBA;
|
use Friendica\Database\DBA;
|
||||||
|
|
||||||
if (!defined('DB_UPDATE_VERSION')) {
|
if (!defined('DB_UPDATE_VERSION')) {
|
||||||
define('DB_UPDATE_VERSION', 1374);
|
define('DB_UPDATE_VERSION', 1375);
|
||||||
}
|
}
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
|
@ -749,3 +749,12 @@ function pre_update_1365()
|
||||||
|
|
||||||
return Update::SUCCESS;
|
return Update::SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function update_1375()
|
||||||
|
{
|
||||||
|
if (!DBA::e("UPDATE `item` SET `thr-parent` = `parent-uri`, `thr-parent-id` = `parent-uri-id` WHERE `thr-parent` = ''")) {
|
||||||
|
return Update::FAILED;
|
||||||
|
}
|
||||||
|
|
||||||
|
return Update::SUCCESS;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue