]> git.mxchange.org Git - friendica.git/commitdiff
Merge pull request #9362 from annando/post-update-term
authorTobias Diekershoff <tobias.diekershoff@gmx.net>
Mon, 5 Oct 2020 04:35:47 +0000 (06:35 +0200)
committerGitHub <noreply@github.com>
Mon, 5 Oct 2020 04:35:47 +0000 (06:35 +0200)
Postupdate: Check for existence of the "term" table

1  2 
src/Database/PostUpdate.php

index 6713330e599a216d5300373836de5fa6a98c07d4,9b467c7101d027f11b5eec19c5ecc62f5305f771..c6b151af5f23a696fb0274001b5a27fd752b5527
@@@ -45,7 -45,6 +45,7 @@@ class PostUpdat
  {
        // Needed for the helper function to read from the legacy term table
        const OBJECT_TYPE_POST  = 1;
 +      const VERSION = 1349;
  
        /**
         * Calls the post update functions
                        return true;
                }
  
+               if (!DBStructure::existsTable('term')) {
+                       DI::config()->set('system', 'post_update_version', 1342);
+                       return true;
+               }
                $id = DI::config()->get('system', 'post_update_version_1342_id', 0);
  
                Logger::info('Start', ['item' => $id]);
                        return true;
                }
  
+               if (!DBStructure::existsTable('term')) {
+                       DI::config()->set('system', 'post_update_version', 1346);
+                       return true;
+               }
                $id = DI::config()->get('system', 'post_update_version_1346_id', 0);
  
                Logger::info('Start', ['item' => $id]);