Skip to content
New issue

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

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

Already on GitHub? # to your account

Cannot upgrade to Music 1.3.2 from 1.3.1 in Nextcloud #892

Closed
JoshuaPettus opened this issue Sep 6, 2021 · 5 comments
Closed

Cannot upgrade to Music 1.3.2 from 1.3.1 in Nextcloud #892

JoshuaPettus opened this issue Sep 6, 2021 · 5 comments

Comments

@JoshuaPettus
Copy link

Hi,

When I tried to do the update I got

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

Repair step: Drop any incompatible music database entries

Exception: Database error when running migration latest for app music

I'm using Nextcloud 22 with PHP 8.0.10

As of yet I haven't found anything in the log as to why...

@JoshuaPettus
Copy link
Author

I was forced to disable the app via comandline, I then tried to enable the app and got

An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'joshuapettus-0' for key 'music_bookmarks_user_track'

Seems the update borked something in the sql database.

paulijar added a commit to paulijar/music that referenced this issue Sep 6, 2021
The commit ff96ad2 caused a new problem when updating on Nextcloud
from Music v1.3.1 to v1.3.2. It probably depended on the DBMS used
and/or the contents of the previous database, if this prevented the
update altogether. But even if it succeeded, the DB schema for the table
oc_music_bookmarks got messed up (the table ended up containing one
obsolete column and one obsolete unique index which were not supposed to
be there after v1.3.0).

In this commit, the functionality of two previous migration scripts is
combined to a single script file. This makes the overall logic easier
to follow and should be less prone for surprises.

refs owncloud#892
@paulijar
Copy link
Collaborator

paulijar commented Sep 6, 2021

Thanks for the report. I just released a quick fix v1.3.3. I hope I got the migration logic right this time.

@raimund-schluessler
Copy link

I just updated to v1.3.3 from v1.3.1 on Nextcloud 22.1.1 and it worked fine without errors.

@JoshuaPettus
Copy link
Author

Thank you! 1.3.3 worked!

@poltrian, to get your nextcloud back you first have to disable music via the commandline

navigate to your nextcloud folder then
sudo -u www-data php occ app:disable music

then take it out of maintenance mode. I know there is a command for it but all I can ever remember is to edit the config.php. Then you are good to update the app and enable it again.

@raimund-schluessler
Copy link

then take it out of maintenance mode. I know there is a command for it but all I can ever remember is to edit the config.php.

sudo -u www-data php occ maintenance:mode --off

@paulijar paulijar closed this as completed Sep 6, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants