jgeusebroek / docker-spotweb

A docker image running ubuntu/20.04 Linux and Spotweb
47 stars 27 forks source link

DB upgrade issue with latest Docker update? #36

Closed brambaars closed 3 years ago

brambaars commented 3 years ago

Hi Jeroen, I've been a happy user of your Spotweb image for quite some time now, thanks for your efforts! Until the day before yesterday, I succesfully used it. Yesterday I received an update (triggered by Watchtower). Today I see this message: Spotweb contains updated global settings settings. Please run 'bin/upgrade-db.php' from a console window So I opened a shell through Portainer, started the upgrade-db.php, then I read the following:

root@spotweb:/var/www/spotweb/bin# php upgrade-db.php
Updating schema..(pdo_mysql)
        Validating spots(messageid)
        Validating spots(poster)

SpotWeb crashed

Database schema or settings upgrade failed:
   Invalid collation setting for varchar: utf8mb3_unicode_ci

#0 /var/www/spotweb/lib/dbstruct/SpotStruct_abs.php(200): SpotStruct_mysql->getColumnInfo()
#1 /var/www/spotweb/lib/dbstruct/SpotStruct_abs.php(182): SpotStruct_abs->compareColumn()
#2 /var/www/spotweb/lib/dbstruct/SpotStruct_abs.php(381): SpotStruct_abs->validateColumn()
#3 /var/www/spotweb/lib/services/Upgrade/Services_Upgrade_Base.php(56): SpotStruct_abs->updateSchema()
#4 /var/www/spotweb/bin/upgrade-db.php(55): Services_Upgrade_Base->database()
#5 {main}root@spotweb:/var/www/spotweb/bin# 
jgeusebroek commented 3 years ago

Thanks for reporting. This seems to be an issue with the latest spotweb and isn't related to the docker image itself.

Issue: https://github.com/spotweb/spotweb/issues/704

I myself don't have this issue.

jgeusebroek commented 3 years ago

What database version are you using? Seems that MariaDB 10.6 isn't supported.

brambaars commented 3 years ago

Indeed, I'm using a MariaDB 10.6 docker container... Thanks for clarifying!

vpieper commented 3 years ago

Extract the DB from your docker, import it in a temp 10.5/4/3 Mariadb, run the upgrade-db php script there, then dump again and re-import in your Docker image and rebuild image. Is how I did it, except no Docker.

jgeusebroek commented 3 years ago

Since this is not related to the docker image, I'm closing it for now.

mesa57 commented 3 years ago

It is even not related with Spotweb itselfs. It is just that MariaDB decide to create an non backwards compatible version 10.6 (10.5 still works fine). It is coincidence that you have to run bin\upgrade-db.php because of settings changes in the last version of spotweb.

mesa57 commented 3 years ago

We found a solution which is now checked in on the develop branch.

mesa57 commented 3 years ago

The master branch has been updated.

jgeusebroek commented 3 years ago

Awesome, image is being build.