Skip to content

Database migration fails for new schemes #6935

@Hartmnt

Description

@Hartmnt

Description

When trying to increase the ServerDatabase::DB_SCHEME_VERSION without changing anything else, migration of an existing v10 database fails with:

[ERROR]: Exiting due to unhandled exception: error preparing statement: index server_logs_message_date_index already exists while preparing "CREATE INDEX "server_logs_message_date_index" ON "server_logs" ("message_date")".

The tested database backend is sqlite. Others were not tested.

I have to remove all existing indices and triggers manually, to end up with:

[ERROR]: Exiting due to unhandled exception: Failed to delete 1 old tables after migration

after that.

This is not a user facing issue, this is a developer facing issue. Migration from v9 to v10 seems to work fine as far as I can tell.

Steps to reproduce

  1. Have an existing v10 Database
  2. Rebuild mumble-server with a version change to v11 and no scheme changes
  3. Observe mumble-server being unable to migrate

Mumble version

1.6.x

Mumble component

Server

OS

Linux

Reproducible?

Yes

Additional information

No response

Relevant log output

Screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA bug (error) in the softwareserver

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions