<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>3.1.0 Beta 4</version> <!-- codename: tornado -->
- <date>2017-12-11</date>
+ <version>3.1.0 Beta 5</version> <!-- codename: tornado -->
+ <date>2017-12-22</date>
</packageinformation>
<authorinformation>
<instruction type="script">acp/post_install.php</instruction>
</instructions>
- <instructions type="update" fromversion="3.1.0 Beta 3">
+ <instructions type="update" fromversion="3.1.0 Beta 4">
<instruction type="acpTemplate">acptemplates_update.tar</instruction>
<instruction type="file">files_update.tar</instruction>
<instruction type="template">templates_update.tar</instruction>
- <instruction type="sql">update_3.1.0_beta_4.sql</instruction>
- <instruction type="script" run="standalone">acp/update_com.woltlab.wcf_3.1.0_beta_4_addColumn.php</instruction>
-
<instruction type="language" />
- <instruction type="mediaProvider" />
- <instruction type="objectType" />
- <instruction type="option" />
<instruction type="userGroupOption" />
</instructions>
</package>
+++ /dev/null
-<?php
-use wcf\system\package\SplitNodeException;
-use wcf\system\WCF;
-use wcf\util\StringUtil;
-
-/**
- * Adds database columns, each row in the data section
- * below is executed in a separate request.
- *
- * @author Alexander Ebert
- * @copyright 2001-2017 WoltLab GmbH
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package WoltLabSuite\Core
- */
-$data = <<<DATA
-ALTER TABLE wcf1_user ADD COLUMN coverPhotoHash CHAR(40) DEFAULT NULL, ADD COLUMN coverPhotoExtension VARCHAR(4) NOT NULL DEFAULT '', ADD COLUMN disableCoverPhoto TINYINT(1) NOT NULL DEFAULT 0, ADD COLUMN disableCoverPhotoReason TEXT, ADD COLUMN disableCoverPhotoExpires INT(10) NOT NULL DEFAULT 0;
-DATA;
-
-$lines = explode("\n", StringUtil::trim($data));
-
-$rebuildData = WCF::getSession()->getVar('__wcfUpdateAddColumns');
-if ($rebuildData === null) {
- $rebuildData = [
- 'i' => 0,
- 'max' => count($lines)
- ];
-}
-
-// MySQL adds a column by creating a new table in the
-// background and copying over all the data afterwards.
-//
-// Using a single `ALTER TABLE` to add multiple columns
-// results in the same runtime, because copying the table
-// is what actually takes ages.
-$statement = WCF::getDB()->prepareStatement(str_replace('wcf1_', 'wcf'.WCF_N.'_', $lines[$rebuildData['i']]));
-$statement->execute();
-
-$rebuildData['i']++;
-
-if ($rebuildData['i'] === $rebuildData['max']) {
- WCF::getSession()->unregister('__wcfUpdateAddColumns');
-}
-else {
- WCF::getSession()->register('__wcfUpdateAddColumns', $rebuildData);
-
- // call this script again
- throw new SplitNodeException();
-}