From: Alexander Ebert Date: Mon, 2 Dec 2019 10:58:13 +0000 (+0100) Subject: Experimental upgrade support for 3.1 -> 5.2 X-Git-Tag: 5.2.0_RC_1~15 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=281a67e7c44174433f96bd2006ec524e12d9b335;p=GitHub%2FWoltLab%2FWCF.git Experimental upgrade support for 3.1 -> 5.2 --- diff --git a/com.woltlab.wcf/files_pre.tar b/com.woltlab.wcf/files_pre.tar index 9efaafed3d..d002bd0553 100644 Binary files a/com.woltlab.wcf/files_pre.tar and b/com.woltlab.wcf/files_pre.tar differ diff --git a/com.woltlab.wcf/package.xml b/com.woltlab.wcf/package.xml index b8f2edbc7c..727311d952 100644 --- a/com.woltlab.wcf/package.xml +++ b/com.woltlab.wcf/package.xml @@ -5,7 +5,7 @@ Free CMS and web-framework, designed for awesome websites and communities. Freies CMS und Web-Framework, das eindrucksvolle Websites und Communities ermöglicht. 1 - 5.2.0 Beta 4 + 5.2.0 RC 1 2019-12-01 @@ -69,13 +69,10 @@ - acp/update-com.woltlab.wcf_5.2.php + acp/update-com.woltlab.wcf_5.2.php - acp/update-com.woltlab.wcf_5.2_reactionUpdate.php - - - acp/update-com.woltlab.wcf_5.2_reloadRoutingCache.php + acp/update-com.woltlab.wcf_5.2_reactionUpdate.php diff --git a/wcfsetup/install/files/acp/update-com.woltlab.wcf_5.2.php b/wcfsetup/install/files/acp/update-com.woltlab.wcf_5.2.php index 04d7c03226..e4896d7914 100644 --- a/wcfsetup/install/files/acp/update-com.woltlab.wcf_5.2.php +++ b/wcfsetup/install/files/acp/update-com.woltlab.wcf_5.2.php @@ -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') diff --git a/wcfsetup/install/files/acp/update-com.woltlab.wcf_5.2_reactionUpdate.php b/wcfsetup/install/files/acp/update-com.woltlab.wcf_5.2_reactionUpdate.php index 2a335baa80..9ef5c88efa 100644 --- a/wcfsetup/install/files/acp/update-com.woltlab.wcf_5.2_reactionUpdate.php +++ b/wcfsetup/install/files/acp/update-com.woltlab.wcf_5.2_reactionUpdate.php @@ -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 index c71bd65294..0000000000 --- a/wcfsetup/install/files/acp/update-com.woltlab.wcf_5.2_reloadRoutingCache.php +++ /dev/null @@ -1,5 +0,0 @@ -reset(); diff --git a/wcfsetup/install/files/lib/system/WCF.class.php b/wcfsetup/install/files/lib/system/WCF.class.php index 1283fd8c44..6b9d87d5c2 100644 --- a/wcfsetup/install/files/lib/system/WCF.class.php +++ b/wcfsetup/install/files/lib/system/WCF.class.php @@ -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 diff --git a/wcfsetup/install/files/lib/system/database/table/index/DatabaseTablePrimaryIndex.class.php b/wcfsetup/install/files/lib/system/database/table/index/DatabaseTablePrimaryIndex.class.php index 964c6fb0fe..6a9c88a716 100644 --- a/wcfsetup/install/files/lib/system/database/table/index/DatabaseTablePrimaryIndex.class.php +++ b/wcfsetup/install/files/lib/system/database/table/index/DatabaseTablePrimaryIndex.class.php @@ -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); }