Insert new `identifier` column for background jobs
authorCyperghost <olaf_schmitz_1@t-online.de>
Wed, 21 Feb 2024 10:23:46 +0000 (11:23 +0100)
committerCyperghost <olaf_schmitz_1@t-online.de>
Wed, 21 Feb 2024 10:23:46 +0000 (11:23 +0100)
wcfsetup/install/files/acp/database/update_com.woltlab.wcf_6.1.php
wcfsetup/setup/db/install.sql

index f15d1743801dbdc37ec43b5ca61137c6b9977593..26e50c3d5fb1e67a53eefec2c5f145cd74d73a3b 100644 (file)
@@ -11,6 +11,7 @@
 use wcf\system\database\table\column\DefaultFalseBooleanDatabaseTableColumn;
 use wcf\system\database\table\column\NotNullInt10DatabaseTableColumn;
 use wcf\system\database\table\column\NotNullVarchar191DatabaseTableColumn;
+use wcf\system\database\table\column\VarcharDatabaseTableColumn;
 use wcf\system\database\table\DatabaseTable;
 use wcf\system\database\table\index\DatabaseTableForeignKey;
 use wcf\system\database\table\index\DatabaseTableIndex;
@@ -41,5 +42,15 @@ return [
             DatabaseTableIndex::create('messageEmbeddedObject')
                 ->type(DatabaseTableIndex::UNIQUE_TYPE)
                 ->columns(['messageObjectTypeID', 'messageID', 'embeddedObjectTypeID', 'embeddedObjectID']),
+        ]),
+    PartialDatabaseTable::create('wcf1_background_job')
+        ->columns([
+            VarcharDatabaseTableColumn::create('identifier')
+                ->length(191)
+                ->defaultValue(null),
+        ])
+        ->indices([
+            DatabaseTableIndex::create('identifier')
+                ->columns(['identifier']),
         ])
 ];
index f4407cd6e614af9c94c7e743de631ea826e501ca..59aecbe0ebcfae15586accb48d44dbfe869b9f51 100644 (file)
@@ -234,6 +234,9 @@ CREATE TABLE wcf1_background_job (
        job MEDIUMBLOB NOT NULL,
        status ENUM('ready', 'processing') NOT NULL DEFAULT 'ready',
        time INT(10) NOT NULL,
+       identifier VARCHAR(191) NULL,
+
+       KEY identifier (identifier),
        KEY (status, time)
 );