linuxserver / docker-bookstack

A Docker container for the BookStack documentation wiki
GNU General Public License v3.0
762 stars 108 forks source link

Migration fails #89

Closed Evoolo closed 3 years ago

Evoolo commented 3 years ago

linuxserver.io

Hello,

on Raspberry Pi 4 the migration fails. This bug is also mentioned on the offical repo and its already closed. For some reason it still exists here. Maybe it's the database version?

https://github.com/BookStackApp/BookStack/issues/425

Thank you for your help.


Expected Behavior

migrating successfully

Current Behavior

migration fails with exception

Steps to Reproduce

  1. copy the compose file
  2. edit environment variables and network -> see below
  3. compose up
  4. starting fails

Environment

OS: Debian Buster CPU architecture: arm32 / RPI 4

Command used to create docker container (run/create/compose/screenshot)

container -->

version: "2" services: bookstack: image: ghcr.io/linuxserver/bookstack:version-v21.04 container_name: bookstack environment:

Docker logs

  Migrating: 2021_03_08_215138_add_user_slug

Illuminate\Database\QueryException  : SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes (SQL: alter table `users` add unique `users_slug_unique`(`slug`))

at /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Connection.php:669

 665|         // If an exception occurs when attempting to run a query, we'll format the error

 666|         // message to include the bindings with SQL, which will make this exception a

 667|         // lot more helpful to the developer instead of just the database's errors.

 668|         catch (Exception $e) {

669| throw new QueryException(

 670|                 $query, $this->prepareBindings($bindings), $e

 671|             );

 672|         }

 673|

Exception trace:

1 Doctrine\DBAL\Driver\PDO\Exception::("SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes")

   /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php:18

2 Doctrine\DBAL\Driver\PDO\Exception::new(Object(PDOException))

   /var/www/html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:117

Please use the argument -v to see more details.

[cont-init.d] 50-config: exited 0.

[cont-init.d] 99-custom-files: executing...

[custom-init] no custom files found exiting...

[cont-init.d] 99-custom-files: exited 0.

[cont-init.d] done.

[services.d] starting services

[services.d] done.

github-actions[bot] commented 3 years ago

Thanks for opening your first issue here! Be sure to follow the bug or feature issue templates!

tobbenb commented 3 years ago

Looks like you didn't read the issue you linked. It's caused by using a version of mariadb that is too old. You should change your OS to a 64 bit one to get the latest versions of mariadb. We are in the process of rebasing to alpine Linux for mariadb to get the same version on all arches, but it's not ready for production yet.