<instruction type="acpTemplate">acptemplates_update.tar</instruction>
<instruction type="file">files_update.tar</instruction>
<instruction type="template">templates_update.tar</instruction>
+ <instruction type="script">acp/update-com.woltlab.wcf_5.2.0_beta_3.php</instruction>
<instruction type="language" />
</instructions>
--- /dev/null
+<?php
+use wcf\system\database\table\DatabaseTableChangeProcessor;
+use wcf\system\database\table\index\DatabaseTableIndex;
+use wcf\system\database\table\PartialDatabaseTable;
+use wcf\system\package\plugin\ScriptPackageInstallationPlugin;
+use wcf\system\WCF;
+
+/**
+ * Updates the database table layout from WoltLab Suite Core 5.2.0 Beta 2 to 5.2.0 Beta 3.
+ *
+ * @author Matthias Schmidt
+ * @copyright 2001-2019 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ */
+
+$tables = [
+ PartialDatabaseTable::create('wcf1_package')
+ ->indices([
+ DatabaseTableIndex::create('package')
+ ->columns(['package'])
+ ->drop(),
+
+ DatabaseTableIndex::create()
+ ->type(DatabaseTableIndex::UNIQUE_TYPE)
+ ->columns(['package'])
+ ])
+];
+
+(new DatabaseTableChangeProcessor(
+/** @var ScriptPackageInstallationPlugin $this */
+ $this->installation->getPackage(),
+ $tables,
+ WCF::getDB()->getEditor())
+)->process();
isApplication TINYINT(1) NOT NULL DEFAULT 0,
author VARCHAR(255) NOT NULL DEFAULT '',
authorURL VARCHAR(255) NOT NULL DEFAULT '',
- KEY package (package)
+ UNIQUE KEY package (package)
);
DROP TABLE IF EXISTS wcf1_package_compatibility;