[Database version 1375] Add update method to populate missing item.thr-parent values
This commit is contained in:
parent
2e7c505ac0
commit
c98da63041
|
@ -54,7 +54,7 @@
|
|||
use Friendica\Database\DBA;
|
||||
|
||||
if (!defined('DB_UPDATE_VERSION')) {
|
||||
define('DB_UPDATE_VERSION', 1374);
|
||||
define('DB_UPDATE_VERSION', 1375);
|
||||
}
|
||||
|
||||
return [
|
||||
|
|
|
@ -749,3 +749,12 @@ function pre_update_1365()
|
|||
|
||||
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