]> git.mxchange.org Git - friendica.git/commitdiff
[Database version 1375] Add update method to populate missing item.thr-parent values
authorHypolite Petovan <hypolite@mrpetovan.com>
Fri, 13 Nov 2020 10:05:52 +0000 (05:05 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sat, 14 Nov 2020 15:11:26 +0000 (10:11 -0500)
static/dbstructure.config.php
update.php

index d1da02412604b49692ae3bf76e1d052258fcb7e1..290550174780c9c1b04e2145216d90767686968a 100644 (file)
@@ -54,7 +54,7 @@
 use Friendica\Database\DBA;
 
 if (!defined('DB_UPDATE_VERSION')) {
-       define('DB_UPDATE_VERSION', 1374);
+       define('DB_UPDATE_VERSION', 1375);
 }
 
 return [
index 37cccd768de6380ee8ca899b2b6febd4cfc88809..460fad885c15b780ea05c2be16fe4aaf60237bd5 100644 (file)
@@ -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;
+}