]> git.mxchange.org Git - friendica.git/commitdiff
[Database version 1449] Coalesce null values in post-content.body field of post-user...
authorHypolite Petovan <hypolite@mrpetovan.com>
Sat, 29 Jan 2022 07:45:12 +0000 (02:45 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sat, 29 Jan 2022 07:45:12 +0000 (02:45 -0500)
database.sql
static/dbstructure.config.php
static/dbview.config.php

index 4179932ad8d767ae859db57dd5573d8dcdcdcc5c..692b5deb70d2d593f006c591780cade3b2838b49 100644 (file)
@@ -1,6 +1,6 @@
 -- ------------------------------------------
 -- Friendica 2021.12-rc (Siberian Iris)
--- DB_UPDATE_VERSION 1448
+-- DB_UPDATE_VERSION 1449
 -- ------------------------------------------
 
 
@@ -1614,7 +1614,7 @@ CREATE VIEW `post-user-view` AS SELECT
        `post-content`.`title` AS `title`,
        `post-content`.`content-warning` AS `content-warning`,
        `post-content`.`raw-body` AS `raw-body`,
-       `post-content`.`body` AS `body`,
+       IFNULL (`post-content`.`body`, '') AS `body`,
        `post-content`.`rendered-hash` AS `rendered-hash`,
        `post-content`.`rendered-html` AS `rendered-html`,
        `post-content`.`language` AS `language`,
index ca52dace8b0a29441701a4da9c31fd4354fa009f..39481348e215184486f0db3bccddea538fea2266 100644 (file)
@@ -55,7 +55,7 @@
 use Friendica\Database\DBA;
 
 if (!defined('DB_UPDATE_VERSION')) {
-       define('DB_UPDATE_VERSION', 1448);
+       define('DB_UPDATE_VERSION', 1449);
 }
 
 return [
index 9939e894d9be4dc97b0adb17c5133a4be91bac27..4188c7726d5acd30db20372a4c2405e4444a87d4 100644 (file)
                        "title" => ["post-content", "title"],
                        "content-warning" => ["post-content", "content-warning"],
                        "raw-body" => ["post-content", "raw-body"],
-                       "body" => ["post-content", "body"],
+                       "body" => "IFNULL (`post-content`.`body`, '')",
                        "rendered-hash" => ["post-content", "rendered-hash"],
                        "rendered-html" => ["post-content", "rendered-html"],
                        "language" => ["post-content", "language"],