From 8866b0eb6ca2267efbf85c000e8366c91366e55a Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 17 Oct 2023 17:11:37 +0200 Subject: [PATCH] Migrate the style system earlier to avoid bricking the ACP See https://www.woltlab.com/community/thread/302169/ --- com.woltlab.wcf/package.xml | 6 ++-- .../database/update_com.woltlab.wcf_6.0.php | 9 ------ .../update_com.woltlab.wcf_6.0_style.php | 28 +++++++++++++++++++ 3 files changed, 32 insertions(+), 11 deletions(-) create mode 100644 wcfsetup/install/files/acp/database/update_com.woltlab.wcf_6.0_style.php diff --git a/com.woltlab.wcf/package.xml b/com.woltlab.wcf/package.xml index a9c707ab3b..0694d56fdb 100644 --- a/com.woltlab.wcf/package.xml +++ b/com.woltlab.wcf/package.xml @@ -72,6 +72,10 @@ tar cvf com.woltlab.wcf/files_pre_check.tar -C wcfsetup/install/files/ \ acp/database/update_com.woltlab.wcf_6.0_pre.php + + acp/database/update_com.woltlab.wcf_6.0_style.php + acp/update_com.woltlab.wcf_6.0_styleVariables.php + @@ -97,8 +101,6 @@ tar cvf com.woltlab.wcf/files_pre_check.tar -C wcfsetup/install/files/ \ acp/database/update_com.woltlab.wcf_6.0_trackedVisit_step2.php acp/database/update_com.woltlab.wcf_6.0_trackedVisit_step3.php - acp/update_com.woltlab.wcf_6.0_styleVariables.php - diff --git a/wcfsetup/install/files/acp/database/update_com.woltlab.wcf_6.0.php b/wcfsetup/install/files/acp/database/update_com.woltlab.wcf_6.0.php index e14a707e88..1d030f413f 100644 --- a/wcfsetup/install/files/acp/database/update_com.woltlab.wcf_6.0.php +++ b/wcfsetup/install/files/acp/database/update_com.woltlab.wcf_6.0.php @@ -112,15 +112,6 @@ return [ ->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([ diff --git a/wcfsetup/install/files/acp/database/update_com.woltlab.wcf_6.0_style.php b/wcfsetup/install/files/acp/database/update_com.woltlab.wcf_6.0_style.php new file mode 100644 index 0000000000..1fa8335115 --- /dev/null +++ b/wcfsetup/install/files/acp/database/update_com.woltlab.wcf_6.0_style.php @@ -0,0 +1,28 @@ + + */ + +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'), + ]), +]; -- 2.20.1