Page 1 of 1

[Solved] Failed Update

Posted: Mon Apr 12, 2021 7:49 pm
by hughesbros
After updating to the latest version I am unable to start Unimus as it says the following:

Failed to start Unimus
Could not upgrade the database.
Please contact support or restart Unimus and try again.

Unimus.log below:

Code: Select all

2021-04-12 14:30:42.469  INFO 924 --- [SimpleAsyncTaskExecutor-1] n.u.s.b.boot.step.DatabaseUpdate         : Updating database schema
2021-04-12 14:30:46.782 ERROR 924 --- [SimpleAsyncTaskExecutor-1] liquibase                                : classpath:/db/changelog/mysql/db.changelog-master-mysql.xml: classpath:/db/changelog/mysql/db.changelog-2.0.11-mysql.xml::1612527601-8::johnny: Change Set classpath:/db/changelog/mysql/db.changelog-2.0.11-mysql.xml::1612527601-8::johnny failed.  Error: Table 'push_preset_to_tag' already exists [Failed SQL: CREATE TABLE unimus.push_preset_to_tag (push_preset_id BIGINT NOT NULL, tag_id BIGINT NOT NULL, CONSTRAINT PK_PUSH_PRESET_TO_TAG PRIMARY KEY (push_preset_id, tag_id))]
2021-04-12 14:30:46.782  WARN 924 --- [SimpleAsyncTaskExecutor-1] n.u.b.d.LiquibaseChangeExecListenerImpl  : [runFailed] Changelog = 'classpath:/db/changelog/mysql/db.changelog-master-mysql.xml'. ChangeSet = '1612527601-8'. Reason = 'liquibase.exception.MigrationFailedException: Migration failed for change set classpath:/db/changelog/mysql/db.changelog-2.0.11-mysql.xml::1612527601-8::johnny:
     Reason: liquibase.exception.DatabaseException: Table 'push_preset_to_tag' already exists [Failed SQL: CREATE TABLE unimus.push_preset_to_tag (push_preset_id BIGINT NOT NULL, tag_id BIGINT NOT NULL, CONSTRAINT PK_PUSH_PRESET_TO_TAG PRIMARY KEY (push_preset_id, tag_id))]'
2021-04-12 14:30:46.799 ERROR 924 --- [SimpleAsyncTaskExecutor-1] n.u.s.b.boot.step.DatabaseUpdate         : Failed to update database schema. Reason = 'liquibase.exception.MigrationFailedException: Migration failed for change set classpath:/db/changelog/mysql/db.changelog-2.0.11-mysql.xml::1612527601-8::johnny:
     Reason: liquibase.exception.DatabaseException: Table 'push_preset_to_tag' already exists [Failed SQL: CREATE TABLE unimus.push_preset_to_tag (push_preset_id BIGINT NOT NULL, tag_id BIGINT NOT NULL, CONSTRAINT PK_PUSH_PRESET_TO_TAG PRIMARY KEY (push_preset_id, tag_id))]'

Re: Failed Update

Posted: Mon Apr 12, 2021 8:11 pm
by Tomas
Passed this to the devs for investigation.

Will reply to your ticket as soon as I have any news :)

Re: Failed Update

Posted: Tue Apr 13, 2021 4:55 pm
by hughesbros
Anything on this as of yet?

Re: Failed Update

Posted: Tue Apr 13, 2021 5:42 pm
by Tomas
The devs have found the issue - they will build a small DB repair utility for you that will fix the issue. The issue is specific to certain DB configuration - it does not occur under normal circumstances.

I will reply to the Support Ticket as soon as the DB repair tool is ready.

If anyone runs into the same issue in the future, please open a Support Ticket as well :)

Re: [Solved] Failed Update

Posted: Thu Apr 15, 2021 10:51 pm
by Tomas
Just a small update for anyone reading this in the future - the issue was that some tables in the DB were using the MyISAM engine, and other InnoDB. We highly recommend using InnoDB, so manually migrating all tables in the Unimus DB to use InnoDB will solve this as well.