Experimental upgrade support for 3.1 -> 5.2
authorAlexander Ebert <ebert@woltlab.com>
Mon, 2 Dec 2019 10:58:13 +0000 (11:58 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 2 Dec 2019 10:58:13 +0000 (11:58 +0100)
com.woltlab.wcf/files_pre.tar
com.woltlab.wcf/package.xml
wcfsetup/install/files/acp/update-com.woltlab.wcf_5.2.php
wcfsetup/install/files/acp/update-com.woltlab.wcf_5.2_reactionUpdate.php
wcfsetup/install/files/acp/update-com.woltlab.wcf_5.2_reloadRoutingCache.php [deleted file]
wcfsetup/install/files/lib/system/WCF.class.php
wcfsetup/install/files/lib/system/database/table/index/DatabaseTablePrimaryIndex.class.php

index 9efaafed3d79fb3f6a418570e0bcb9f73ae57b5c..d002bd05532553971d493f75d6ef0fcc874c5b70 100644 (file)
Binary files a/com.woltlab.wcf/files_pre.tar and b/com.woltlab.wcf/files_pre.tar differ
index b8f2edbc7c6d6f584073cdc6b744c4c77a4ca06b..727311d9523d2d2f0aa202b10a06460c02009153 100644 (file)
@@ -5,7 +5,7 @@
                <packagedescription>Free CMS and web-framework, designed for awesome websites and communities.</packagedescription>
                <packagedescription language="de">Freies CMS und Web-Framework, das eindrucksvolle Websites und Communities ermöglicht.</packagedescription>
                <isapplication>1</isapplication>
-               <version>5.2.0 Beta 4</version> <!-- codename: hurricane -->
+               <version>5.2.0 RC 1</version> <!-- codename: hurricane -->
                <date>2019-12-01</date>
        </packageinformation>
        
                <instruction type="language" run="standalone" />
                
                <!-- update database structure using new api -->
-               <instruction type="script">acp/update-com.woltlab.wcf_5.2.php</instruction>
+               <instruction type="script" flushCache="false">acp/update-com.woltlab.wcf_5.2.php</instruction>
                
                <!-- convert likes to reactions -->
-               <instruction type="script">acp/update-com.woltlab.wcf_5.2_reactionUpdate.php</instruction>
-               
-               <!-- reload routing cache to avoid an exception because the new applicationOverride information is missing in cache -->
-               <instruction type="script" run="standalone">acp/update-com.woltlab.wcf_5.2_reloadRoutingCache.php</instruction>
+               <instruction type="script" flushCache="false">acp/update-com.woltlab.wcf_5.2_reactionUpdate.php</instruction>
                
                <instruction type="option" />
                <!-- reload options using the new OptionEditor for providing the enterprise-mode option for further requests (required after file-PIP!) -->
index 04d7c03226d81f370544515bca27251375d9d2fb..e4896d7914d4e42d5eacc470da0c38fac10940ec 100644 (file)
@@ -147,6 +147,13 @@ $tables = [
                                ->onDelete('SET NULL')
                ]),
        
+       // Re-create the key to turn it into a unique key: https://github.com/WoltLab/WCF/issues/3116
+       DatabaseTable::create('wcf1_package')
+               ->indices([
+                       DatabaseTableIndex::create('package')
+                               ->columns(['package'])
+                               ->drop()
+               ]),
        DatabaseTable::create('wcf1_package')
                ->indices([
                        DatabaseTableIndex::create('package')
index 2a335baa8068d33ab65e9724647beb517bfdaaa9..9ef5c88efabf2dcaef23155296855d696008aef1 100644 (file)
@@ -90,7 +90,7 @@ try {
                        dislikes = 0";
        WCF::getDB()->prepareStatement($sql)->execute();
        
-       $statement = WCF::getDB()->prepareStatement('ALTER TABLE wcf'.WCF_N.'_like ADD FOREIGN KEY (reactionTypeID) REFERENCES wcf1_reaction_type (reactionTypeID) ON DELETE CASCADE');
+       $statement = WCF::getDB()->prepareStatement('ALTER TABLE wcf'.WCF_N.'_like ADD FOREIGN KEY (reactionTypeID) REFERENCES wcf'.WCF_N.'_reaction_type (reactionTypeID) ON DELETE CASCADE');
        $statement->execute();
        
        WCF::getDB()->commitTransaction();
diff --git a/wcfsetup/install/files/acp/update-com.woltlab.wcf_5.2_reloadRoutingCache.php b/wcfsetup/install/files/acp/update-com.woltlab.wcf_5.2_reloadRoutingCache.php
deleted file mode 100644 (file)
index c71bd65..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<?php
-namespace wcf\acp;
-use wcf\system\cache\builder\RoutingCacheBuilder;
-
-RoutingCacheBuilder::getInstance()->reset();
index 1283fd8c4464ebba9e2f38c09efb1edd00009b5b..6b9d87d5c25403c94b540f04499e5308b0e940dc 100644 (file)
@@ -49,7 +49,7 @@ if (!@ini_get('date.timezone')) {
 }
 
 // define current woltlab suite version
-define('WCF_VERSION', '5.2.0 Beta 4');
+define('WCF_VERSION', '5.2.0 RC 1');
 
 // define current API version
 // @deprecated 5.2
index 964c6fb0fe577695306172f753dc01e370011350..6a9c88a71687e5c4c51af05c182a2c19978f6791 100644 (file)
@@ -17,9 +17,14 @@ class DatabaseTablePrimaryIndex extends DatabaseTableIndex {
        /**
         * Returns a `PrimaryDatabaseTableIndex` object with `PRIMARY` as name and primary as type.
         * 
+        * @inheritDoc
         * @return      $this
         */
-       public static function create() {
+       public static function create($name = '') {
+               if (!empty($name)) {
+                       throw new \LogicException('The primary index cannot be assigned a name.');
+               }
+               
                return parent::create('PRIMARY')
                        ->type(static::PRIMARY_TYPE);
        }