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

Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes #25556

Closed
dphotograph opened this issue Feb 10, 2021 · 1 comment

Comments

@dphotograph
Copy link

Aktualisierung auf 20.0.7
Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'CREATE UNIQUE INDEX UNIQ_options ON oc_polls_options (poll_id, poll_option_text, timestamp)': SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes

Detaillierte Protokollmeldungen
Update vorbereiten

Log-Level auf "debug" gesetzt

Wartungsmodus eingeschaltet

Reparaturschritt: Repair MySQL collation

Reparaturinformation: All tables already have the correct collation -> nothing to do

Reparaturschritt: Repair SQLite autoincrement

Reparaturschritt: Copy data from accounts table when migrating from ownCloud

Reparaturschritt: Drop account terms table when migrating from ownCloud

Das Datenbankschema wird aktualisiert

Datenbank aktualisiert

Reparaturschritt: Delete duplicates

Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'CREATE UNIQUE INDEX UNIQ_options ON oc_polls_options (poll_id, poll_option_text, timestamp)': SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes

@kesselb
Copy link
Contributor

kesselb commented Feb 10, 2021

Thank you for reporting this issue 👍 Please check #15058 for more details.

Usually there are two ways to fix this:

A) Configure your database server to support utf8mb4 (https://docs.nextcloud.com/server/latest/admin_manual/configuration_database/mysql_4byte_support.html).

B) If the database server does not support utf8mb4 disable it by setting 'mysql.utf8mb4' => false in your config.php (emojis in filename, calendar events, etc. are not possible than and you have to accept the warning).

@kesselb kesselb closed this as completed Feb 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants