nextcloud / ocsms

📱 Nextcloud/ownCloud PhoneSync server application
https://play.google.com/store/apps/details?id=fr.unix_experience.owncloud_sms
GNU Affero General Public License v3.0
189 stars 52 forks source link

Index column size too large at update #312

Closed aqsdcv2 closed 4 years ago

aqsdcv2 commented 4 years ago

Steps to reproduce

  1. The interface says an update of the ocsms app is available
  2. Click on update
  3. Database migration does not work and the instance is not usable anymore

Expected behaviour

The update of the application goes smoothly.

Actual behaviour

I cannt use my nextcloud because it is stucked on the update page.

Server configuration

Nextcloud/ownCloud version:

Nextcloud 17.0.3

 sudo -u www-data php occ app:list | grep ocsms
  - ocsms: 2.1.6

PHP version:

PHP 7.2.24-0ubuntu0.18.04.3 (cli) (built: Feb 11 2020 15:55:52) ( NTS )

HTTPd server:

Server version: Apache/2.4.29 (Ubuntu)
Server built:   2019-09-16T12:58:48

Database engine & version:

mysql  Ver 15.1 Distrib 10.1.44-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

Client configuration

Android version:

Phone:

Nextcloud SMS app version:

Logs

Preparing update

Set log level to debug

Turned on maintenance mode

Repair step: Repair MySQL collation

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

Repair step: Repair SQLite autoincrement

Repair step: Copy data from accounts table when migrating from ownCloud

Repair step: Drop account terms table when migrating from ownCloud

Updating database schema

Updated database

Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'DROP INDEX smsdata_user_mailbox_address ON oc_ocsms_smsdatas': SQLSTATE[HY000]: General error: 1709 Index column size too large. The maximum column size is 767 bytes.
e-alfred commented 4 years ago

Did you follow this advice: https://github.com/nextcloud/ocsms#question-solve-innodb-index-column-size-too-large-error-on-mysql

aqsdcv2 commented 4 years ago

Sorry, i honestly didn't even checked the readme :( . As nextcloud told me in the interface that everything was on point, i assumed it was a problem with the new version of the application.

Following what they said in stackoverflow, i used :

 set global innodb_file_format='BARRACUDA';

Then the update process worked flawlessly.

Thank you.