SQL update 5.2 Beta 1 -> Beta 2
authorAlexander Ebert <ebert@woltlab.com>
Sun, 29 Sep 2019 14:50:21 +0000 (16:50 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sun, 29 Sep 2019 14:50:21 +0000 (16:50 +0200)
wcfsetup/install/files/acp/update-com.woltlab.wcf_5.2.0_beta_2.php [new file with mode: 0644]

diff --git a/wcfsetup/install/files/acp/update-com.woltlab.wcf_5.2.0_beta_2.php b/wcfsetup/install/files/acp/update-com.woltlab.wcf_5.2.0_beta_2.php
new file mode 100644 (file)
index 0000000..44f48fe
--- /dev/null
@@ -0,0 +1,43 @@
+<?php
+use wcf\system\database\table\column\{
+       DefaultFalseBooleanDatabaseTableColumn,
+       DefaultTrueBooleanDatabaseTableColumn,
+       NotNullVarchar255DatabaseTableColumn
+};
+use wcf\system\database\table\DatabaseTable;
+use wcf\system\database\table\DatabaseTableChangeProcessor;
+use wcf\system\package\plugin\ScriptPackageInstallationPlugin;
+use wcf\system\WCF;
+
+/**
+ * Updates the database table layout from WoltLab Suite Core 5.2.0 Beta 1 to 5.2.0 Beta 2
+ * 
+ * @author     Alexander Ebert, Matthias Schmidt
+ * @copyright  2001-2019 WoltLab GmbH
+ * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ */
+
+$tables = [
+       DatabaseTable::create('wcf1_package_installation_sql_log')
+               ->columns([
+                       DefaultTrueBooleanDatabaseTableColumn::create('isDone'),
+               ]),
+       
+       DatabaseTable::create('wcf1_reaction_type')
+               ->columns([
+                       NotNullVarchar255DatabaseTableColumn::create('title'),
+                       NotNullVarchar255DatabaseTableColumn::create('iconFile')
+                               ->defaultValue(''),
+                       DefaultTrueBooleanDatabaseTableColumn::create('isAssignable'),
+                       
+                       DefaultFalseBooleanDatabaseTableColumn::create('isDisabled')
+                               ->drop()
+               ]),
+];
+
+(new DatabaseTableChangeProcessor(
+       /** @var ScriptPackageInstallationPlugin $this */
+       $this->installation->getPackage(),
+       $tables,
+       WCF::getDB()->getEditor())
+)->process();