Repository navigation
can't update Or install ownCloud in version 10.0.1 #28007
Description
Activity
1071 Specified key was too long; max key length is 767 bytes
also cc @tomneedham @butonic as I remember a discussion about index size for this particular table
This is the column and related index
core/core/Migrations/Version20170516100103.php
Lines 51 to 58 in f4b1dc1
$table->addColumn('term', Type::STRING, [ 'notnull' => true, 'length' => 256 ]); $table->setPrimaryKey(['id']); $table->addIndex(['account_id'], 'account_id_index'); $table->addIndex(['term'], 'term_index'); according to https://dev.mysql.com/doc/refman/5.7/en/innodb-restrictions.html we can only go up to 255 chars, and we're trying 256 😞
Any update on the correction to this? I am a long time Owncloud user, but this is completely blocking the upgrade path. I typically use pkg to update, so I unless someone has a manual correction, I suppose I have to wait for the next version release to migrate through pkg before upgrading?
@tomneedham a quickfix in the form of manually executable SQL statements would be nice.
Basically you need to make the column "term" 255 characters instead of 256.
Applying this patch to the 10.0.1 codebase before upgrading will make the upgrade run smoothly:
--- a/core/Migrations/Version20170516100103.php +++ b/core/Migrations/Version20170516100103.php @@ -50,7 +50,7 @@ public function changeSchema(Schema $schema, array $options) { $table->addColumn('term', Type::STRING, [ 'notnull' => true, - 'length' => 256 + 'length' => 255 ]); $table->setPrimaryKey(['id']);- Not familiar with this process. Could you provide some guidance on steps required?…________________________________ From: Tom Needham <notifications@github.com> Sent: Tuesday, May 30, 2017 4:16 AM To: owncloud/core Cc: Jerry Harrison; Comment Subject: Re: [owncloud/core] can't update Or install ownCloud in version 10.0.1 (#28007) Applying this patch to the 10.0.1 codebase before upgrading will make the upgrade run smoothly:--- a/core/Migrations/Version20170516100103.php +++ b/core/Migrations/Version20170516100103.php @@ -50,7 +50,7 @@ public function changeSchema(Schema $schema, array $options) { $table->addColumn('term', Type::STRING, [ 'notnull' => true, - 'length' => 256 + 'length' => 255 ]); $table->setPrimaryKey(['id']); — You are receiving this because you commented. Reply to this email directly, view it on GitHub<#28007 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AXclsw4w_UlgGN9dtctQszkiHvDHHDPzks5r-9BWgaJpZM4NmJ9q>.
I'm still wondering why we didn't find this in local and automated tests. Is this a different version of Mysql / MariaDB or does it have different settings ?
@jerryjharrison just edit the file core/Migrations/Version20170516100103.php and on line 52 replace the value "256" with "255".
Reacted by holymolyReacted by holymolyReacted by holymolyplease all post your Mysql/mariadb version number and config if possible...
- For me it is: mysql56-server-5.6.36 Multithreaded SQL database (server) I am happy to provide you any configuration information you want, but it was a clean install using pkg. The only thing I did after install was to run mysql_secure_installation, and then install owncloud. Nothing other than owncloud is installed on this computer. From: Vincent Petry <notifications@github.com> Reply-To: owncloud/core <reply@reply.github.com> Date: Thursday, June 1, 2017 at 5:43 AM To: owncloud/core <core@noreply.github.com> Cc: Jerry Harrison <jerryjharrison@hotmail.com>, Mention <mention@noreply.github.com> Subject: Re: [owncloud/core] can't update Or install ownCloud in version 10.0.1 (#28007) please all post your Mysql/mariadb version number and config if possible... — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub<#28007 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AXclsyG-N3wgOyPA-Zs8cxx8yT_Ymmdqks5r_ofPgaJpZM4NmJ9q>.
- Sorry, but I am a bit of a noob around github, and downloading the code. I have always installed from pkg. I realize it may be too basic for this thread, but would love to learn how to get and install from github. (edit by @tomneedham, removed quoted email)
I'm still wondering why we didn't find this in local and automated tests. Is this a different version of Mysql / MariaDB or does it have different settings ?
guessing we dont have mysql strict mode enabled on our CI tests => we should turn it on
- I just tried the upgrade to 10.0.2, and it failed due to database schema issues again… Is anybody testing this before it is published? From: Tom Needham <notifications@github.com> Reply-To: owncloud/core <reply@reply.github.com> Date: Tuesday, June 13, 2017 at 9:14 AM To: owncloud/core <core@noreply.github.com> Cc: Jerry Harrison <jerryjharrison@hotmail.com>, Mention <mention@noreply.github.com> Subject: Re: [owncloud/core] can't update Or install ownCloud in version 10.0.1 (#28007) I'm still wondering why we didn't find this in local and automated tests. Is this a different version of Mysql / MariaDB or does it have different settings ? guessing we dont have mysql strict mode enabled on our CI tests => we should turn it on — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub<#28007 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AXcls-8f88OdNi2R6437lI_N08UxYx3Nks5sDotDgaJpZM4NmJ9q>.
@jerryjharrison We have two fixes already implemented for this issue: #28019, #28086
As previously mentioned, please disable strict mode if you wish to upgrade to 10.0.2, or wait for 10.0.3 with these fixes.
Will close this issue once the PR is merged in.
Is anybody testing this before it is published?
@jerryjharrison We're an open source project, everyone is here to help, code, test. Please help out by testing the PRs mentioned above and report back with feedback - this is how we advance the project together
- I do my best on the testing, and regularly contribute when I can. I have reviewed all of the comments on the two open tickets, and cannot find any instructions/guidance on how to turn off strict mode on sql. Additionally, I had requested additional help and would love to learn how to install from the tarball/github but my experience so far is limited to installing from portsnap or pkg… From: Tom Needham <notifications@github.com> Reply-To: owncloud/core <reply@reply.github.com> Date: Tuesday, June 13, 2017 at 9:37 AM To: owncloud/core <core@noreply.github.com> Cc: Jerry Harrison <jerryjharrison@hotmail.com>, Mention <mention@noreply.github.com> Subject: Re: [owncloud/core] can't update Or install ownCloud in version 10.0.1 (#28007) Is anybody testing this before it is published? @jerryjharrison<https://github.com/jerryjharrison> We're an open source project, everyone is here to help, code, test. Please help out by testing the PRs mentioned above and report back with feedback - this is how we advance the project together — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub<#28007 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AXcls2NRPQrhIsO_IAhEFA56ts_RuqlCks5sDpCWgaJpZM4NmJ9q>.
- addedp1-urgentCritical issue, need to consider hotfix with just that issueCritical issue, need to consider hotfix with just that issue
on Jul 3, 2017 waiting for the last backport before closing: #28576
PRs were merged. Fixes will be in 10.0.3
I encountered a similar issue using the Docker version of owncloud and deploying it in GCE :
The versions I have been using :
owncloud/server : latest
dockhippie/mariadb: latest
dockhippie//redis : latestownCloud is not installed - only a limited number of commands are available Error while trying to create admin user: An exception occurred while executing 'CREATE TABLE `oc_mimetypes` (`id` INT AUTO_INCREMENT NOT NULL, `mimetype` VARCHAR(255) DEFAULT '' NOT NULL, UNIQUE INDEX mimetype_id_index (`mimetype`), PRIMARY KEY(`id`)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin ENGINE = InnoDB ROW_FORMAT = compressed':This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
- locked as resolved and limited conversation to collaborators
on Aug 2, 2019
Actual behaviour
Tell us what happens instead
Server configuration
Operating system:
ubuntu
Web server:
apache
Database:
mysql 5.6
PHP version:
PHP Version 5.6.30-0+deb8u1
ownCloud version: (see ownCloud admin page)
10.0.1
Updated from an older ownCloud or fresh install:
install | same as update from 10.0.0
Logs
Web server error
error log