From: Matthias Schmidt Date: Sun, 29 Sep 2019 17:16:22 +0000 (+0200) Subject: Add PartialDatabaseTable X-Git-Tag: 5.2.0_Beta_2~15 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e00d344ba8a01f2b1d7d1e01abd2f1d44b91ede1;p=GitHub%2FWoltLab%2FWCF.git Add PartialDatabaseTable Close #3081 --- diff --git a/wcfsetup/install/files/lib/system/database/table/DatabaseTableChangeProcessor.class.php b/wcfsetup/install/files/lib/system/database/table/DatabaseTableChangeProcessor.class.php index 3672aba3c4..6a0edd586f 100644 --- a/wcfsetup/install/files/lib/system/database/table/DatabaseTableChangeProcessor.class.php +++ b/wcfsetup/install/files/lib/system/database/table/DatabaseTableChangeProcessor.class.php @@ -373,6 +373,10 @@ class DatabaseTableChangeProcessor { } } else if (!in_array($tableName, $this->existingTableNames)) { + if ($table instanceof PartialDatabaseTable) { + throw new \LogicException("Partial table '{$tableName}' cannot be created."); + } + $this->tablesToCreate[] = $table; $this->splitNodeMessage .= "Created table '{$tableName}'."; diff --git a/wcfsetup/install/files/lib/system/database/table/PartialDatabaseTable.class.php b/wcfsetup/install/files/lib/system/database/table/PartialDatabaseTable.class.php new file mode 100644 index 0000000000..3430d18cc7 --- /dev/null +++ b/wcfsetup/install/files/lib/system/database/table/PartialDatabaseTable.class.php @@ -0,0 +1,15 @@ + + * @package WoltLabSuite\Core\System\Database\Table + * @since 5.2 + */ +class PartialDatabaseTable extends DatabaseTable {}