Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MySQL error when try to active the workspace app #585

Open
AlexanderWolfZhang opened this issue Oct 9, 2022 · 2 comments
Open

MySQL error when try to active the workspace app #585

AlexanderWolfZhang opened this issue Oct 9, 2022 · 2 comments
Assignees
Labels
backend Modification related to backend important bug Should be treated after Major bugs

Comments

@AlexanderWolfZhang
Copy link

AlexanderWolfZhang commented Oct 9, 2022

I'm using nextcloud24.0.5.1, database version: 8.0.30 MySQL Community Server, both nc and db were installed in docker on an server running UNRAID 6.10.2.
Trying to install workspace, so I copied the folder into /app, and tried to active via web Gui, and then it gives me an error:
An exception occurred while executing a query: SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 3072 bytes
Is there anyway to solve this?

@AlexanderWolfZhang AlexanderWolfZhang changed the title MySql error when try to active the workspace app MySQL error when try to active the workspace app Oct 9, 2022
@ncgu
Copy link

ncgu commented Mar 3, 2023

Hi,
I am getting the same error message.
NC 25.0.4, MySQL 8.0.32

In the nextcloud log you can find the query for creating the table
CREATE TABLE nc_work_spaces (space_id BIGINT AUTO_INCREMENT NOT NULL, groupfolder_id BIGINT NOT NULL, color_code VARCHAR(128) DEFAULT NULL, space_name VARCHAR(4000) NOT NULL, INDEX IDX_92799E2D3555048C (space_name), INDEX IDX_92799E2D31DCB05D (groupfolder_id), PRIMARY KEY(space_id, groupfolder_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin ENGINE = InnoDB

The query executed in phpmyadmin returns the error message. #1071 - Specified key was too long; max key length is 3072 bytes

If the field length space_name is reduced to 400, the query works.

In lib/Migration/Version0000Date20210615125333.php line 80-83 the column is defined with a length of 128. At line 85-88 the column is change to 4000 length.

grafik

In lib/Migration/Version0000Date20210615125333.php line 80-83 the column is defined with a length of 128. In line 85-88 the length of the column is then changed to 4000.

Why? How large does the length of the field have to be?
If you delete lines 85-88 from lib/Migration/Version0000Date20210615125333.php, you can easily install the Workspace app manually.

@zak39
Copy link
Collaborator

zak39 commented Aug 4, 2023

Hi @AlexanderWolfZhang and @ncgu

Good point @ncgu , I will see that !

Thank you for your contribution 😉

@zak39 zak39 self-assigned this Aug 4, 2023
@zak39 zak39 added backend Modification related to backend important bug Should be treated after Major bugs labels Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Modification related to backend important bug Should be treated after Major bugs
Projects
None yet
Development

No branches or pull requests

3 participants