From 281a67e7c44174433f96bd2006ec524e12d9b335 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Mon, 2 Dec 2019 11:58:13 +0100 Subject: [PATCH] Experimental upgrade support for 3.1 -> 5.2 --- com.woltlab.wcf/files_pre.tar | Bin 183296 -> 192000 bytes com.woltlab.wcf/package.xml | 9 +++------ .../files/acp/update-com.woltlab.wcf_5.2.php | 7 +++++++ ...ate-com.woltlab.wcf_5.2_reactionUpdate.php | 2 +- ...com.woltlab.wcf_5.2_reloadRoutingCache.php | 5 ----- .../install/files/lib/system/WCF.class.php | 2 +- .../index/DatabaseTablePrimaryIndex.class.php | 7 ++++++- 7 files changed, 18 insertions(+), 14 deletions(-) delete mode 100644 wcfsetup/install/files/acp/update-com.woltlab.wcf_5.2_reloadRoutingCache.php diff --git a/com.woltlab.wcf/files_pre.tar b/com.woltlab.wcf/files_pre.tar index 9efaafed3d79fb3f6a418570e0bcb9f73ae57b5c..d002bd05532553971d493f75d6ef0fcc874c5b70 100644 GIT binary patch delta 6909 zcmbtYU2Ggz70!-JoplnL;v{P)O>!5O?riY>`7gzhoowx-HRQ)}(niH`?Ae)Xdy?6i z?aZuy+SD7Bk_r{Ir1LQJfg&N%7YItJL?4h)`+$TH5AcQrNc4#}B&0ros9Mgs_s;Cy zwOt;F5-EG<-gD1AKi~Pzx$}cPcmA^H!7EDt@X*k%^3cf1a(Q&*CQ zB$M;G0sQ#hSnAK+Z<6oyl}|>Bjt+v-py7*{fis zx@*=ncLU60&~>6~w(a<&N{Qxq=CVx%k5Db9y&S999J%#9Nsm8jtdf9pTYTK z^7%?j*3+78Skw*Ayqw6~BdNepjvW~+l}2NUgTq5$no@amcxWWD@ciLKIQDU3PwJq?eNHGS#2x8eD;cKwQJFI&`yyWaTn(O|lA{Hy!{ z9;r1f-^@#|B-CCtUB|9b+Yi25`AxWZU+F$5J-vsVDE8NpnFY+NYzB{2d8b*H#N(AfqD>=@RmZLX@}D$EUP@OGyaO{xjk<%VkoAaGt-5s8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O@|`m#o*HnK(4Rw##HQl$Q;c9-8+IKyoKaOc5C4g&NE=Ti1(Gcve>E0@HDBMZQP6e=(8)8mH$nE9q2ywxN&^1)878^7=WRcwo1Ft9c$7uin delta 324 zcmZp;!`(20dqWG8q=A_MgQ2mhxuJoHk%_SZgMopek(q%BgTZ7$=9JBh%(5brbp>Q5 z&lGpxoFg%XeX_xq*OL@lB@E2bb(xx(7{Yb&GH&KmD(7J|+}x*E#5hrbW03*NBm-5R zp#0L3%)E5x#N>?B>5fv2$`cg?CZ`xEN|+m>n`dTXWDGOUP=RssDH~qZq|(fsl+>aa zWMiBlV%A(-P|@lB=a^(C_j__~H(J2h&e&wqX2Q75gsG)T(%9S-$rhk%4UB+ZhuX58 zaXV8T^YnF-nb@cQTgNCo{l71x7^BAYhAE6P(}Q+1t(&aC+_r2F6W3;gFBgDbG5`RM CZe0@q 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); } -- 2.20.1