Add missing database columns for `wcf1_attachment`, that are installed by the databas...
authorCyperghost <olaf_schmitz_1@t-online.de>
Mon, 10 Jun 2024 08:51:30 +0000 (10:51 +0200)
committerCyperghost <olaf_schmitz_1@t-online.de>
Mon, 10 Jun 2024 08:51:30 +0000 (10:51 +0200)
wcfsetup/install/files/acp/database/update_com.woltlab.wcf_6.1.php

index c9290a18a14d5f17f6031fd6c682ee96eb55fa68..e29c71c67b9428ba7191d0ccff4bf66e0914e108 100644 (file)
@@ -154,4 +154,27 @@ return [
                 ->referencedColumns(['fileID'])
                 ->onDelete('CASCADE'),
         ]),
+    PartialDatabaseTable::create('wcf1_attachment')
+        ->columns([
+            IntDatabaseTableColumn::create('fileID'),
+            IntDatabaseTableColumn::create('thumbnailID'),
+            IntDatabaseTableColumn::create('tinyThumbnailID'),
+        ])
+        ->foreignKeys([
+            DatabaseTableForeignKey::create()
+                ->columns(['fileID'])
+                ->referencedTable('wcf1_file')
+                ->referencedColumns(['fileID'])
+                ->onDelete('SET NULL'),
+            DatabaseTableForeignKey::create()
+                ->columns(['thumbnailID'])
+                ->referencedTable('wcf1_file_thumbnail')
+                ->referencedColumns(['thumbnailID'])
+                ->onDelete('SET NULL'),
+            DatabaseTableForeignKey::create()
+                ->columns(['tinyThumbnailID'])
+                ->referencedTable('wcf1_file_thumbnail')
+                ->referencedColumns(['thumbnailID'])
+                ->onDelete('SET NULL'),
+        ])
 ];