<!-- Required for wcf1_package_installation_file_log. -->
<instruction type="database" run="standalone">acp/database/update_com.woltlab.wcf_6.0_pre.php</instruction>
+ <!-- Add the dark mode support first, because otherwise a failed migration would brick the ACP. -->
+ <instruction type="database" run="standalone">acp/database/update_com.woltlab.wcf_6.0_style.php</instruction>
+ <instruction type="script" run="standalone">acp/update_com.woltlab.wcf_6.0_styleVariables.php</instruction>
+
<!-- Deploy new application code. -->
<instruction type="file" />
<instruction type="acpTemplate" />
<instruction type="database" run="standalone">acp/database/update_com.woltlab.wcf_6.0_trackedVisit_step2.php</instruction>
<instruction type="database" run="standalone">acp/database/update_com.woltlab.wcf_6.0_trackedVisit_step3.php</instruction>
- <instruction type="script" run="standalone">acp/update_com.woltlab.wcf_6.0_styleVariables.php</instruction>
-
<!-- Deploy the new application code again to build the hashes in wcf1_package_installation_file_log. -->
<instruction type="file" />
->columns([
EnumDatabaseTableColumn::create('apiVersion')
->drop(),
- DefaultFalseBooleanDatabaseTableColumn::create('hasDarkMode'),
- ]),
- PartialDatabaseTable::create('wcf1_style_variable')
- ->columns([
- MediumtextDatabaseTableColumn::create('defaultValueDarkMode'),
- ]),
- PartialDatabaseTable::create('wcf1_style_variable_value')
- ->columns([
- MediumtextDatabaseTableColumn::create('variableValueDarkMode'),
]),
PartialDatabaseTable::create('wcf1_user_group_option')
->columns([
--- /dev/null
+<?php
+
+/**
+ * Updates the database layout for the styles during the update from 5.5 to 6.0.
+ *
+ * @author Alexander Ebert
+ * @copyright 2001-2023 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ */
+
+use wcf\system\database\table\column\DefaultFalseBooleanDatabaseTableColumn;
+use wcf\system\database\table\column\MediumtextDatabaseTableColumn;
+use wcf\system\database\table\PartialDatabaseTable;
+
+return [
+ PartialDatabaseTable::create('wcf1_style')
+ ->columns([
+ DefaultFalseBooleanDatabaseTableColumn::create('hasDarkMode'),
+ ]),
+ PartialDatabaseTable::create('wcf1_style_variable')
+ ->columns([
+ MediumtextDatabaseTableColumn::create('defaultValueDarkMode'),
+ ]),
+ PartialDatabaseTable::create('wcf1_style_variable_value')
+ ->columns([
+ MediumtextDatabaseTableColumn::create('variableValueDarkMode'),
+ ]),
+];