]> git.mxchange.org Git - friendica.git/commitdiff
Ensure unified order of 'verb' records
authorMichael <heluecht@pirati.ca>
Tue, 19 May 2020 05:51:58 +0000 (05:51 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 19 May 2020 05:51:58 +0000 (05:51 +0000)
src/Database/DBStructure.php

index b16879e9cc9cc83c0f569dfab3481ebd384fcc82..bf76eccacb50edd3b6f19dcea3360477d3fc4e3c 100644 (file)
@@ -1004,6 +1004,12 @@ class DBStructure
         */
        public static function checkInitialValues()
        {
+               if (self::existsTable('verb') && !DBA::exists('verb', ['id' => 1])) {
+                       foreach (Item::ACTIVITIES as $index => $activity) {
+                               DBA::insert('verb', ['id' => $index + 1, 'name' => $activity], true);
+                       }
+               }
+
                if (self::existsTable('contact') && !DBA::exists('contact', ['id' => 0])) {
                        DBA::insert('contact', ['nurl' => '']);
                        $lastid = DBA::lastInsertId();