Error running migrations #1635

Closed
opened 2026-02-05 01:23:21 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @JensSpanier on GitHub (Jul 9, 2023).

Subject of the issue

When I try to start the new version 1.29.0, I get this error:

[2023-07-09 17:39:11.931][panic][ERROR] thread 'main' panicked at 'Error running migrations: QueryError(DieselMigrationName { name: "2023-06-02-200424_create_organization_api_key", version: MigrationVersion("20230602200424") }, DatabaseError(Unknown, "Can't create table `jspanier_vaultwarden`.`organization_api_key` (errno: 150 \"Foreign key constraint is incorrectly formed\")"))': src/db/mod.rs:471

Deployment environment

  • vaultwarden version: 1.29.0
  • Install method: Docker image

  • MariaDB version: 10.6.12

  • Other relevant details:

Troubleshooting data

I previously updated an instance successfully which has no organisations (MariaDB-Version 10.3.38).
This instance has two organisations.

Let me know if you need more information.

Originally created by @JensSpanier on GitHub (Jul 9, 2023). <!-- # ### NOTE: Please update to the latest version of vaultwarden before reporting an issue! This saves you and us a lot of time and troubleshooting. See: * https://github.com/dani-garcia/vaultwarden/issues/1180 * https://github.com/dani-garcia/vaultwarden/wiki/Updating-the-vaultwarden-image # ### --> <!-- Please fill out the following template to make solving your problem easier and faster for us. This is only a guideline. If you think that parts are unnecessary for your issue, feel free to remove them. Remember to hide/redact personal or confidential information, such as passwords, IP addresses, and DNS names as appropriate. --> ### Subject of the issue When I try to start the new version `1.29.0`, I get this error: ``` [2023-07-09 17:39:11.931][panic][ERROR] thread 'main' panicked at 'Error running migrations: QueryError(DieselMigrationName { name: "2023-06-02-200424_create_organization_api_key", version: MigrationVersion("20230602200424") }, DatabaseError(Unknown, "Can't create table `jspanier_vaultwarden`.`organization_api_key` (errno: 150 \"Foreign key constraint is incorrectly formed\")"))': src/db/mod.rs:471 ``` ### Deployment environment <!-- ========================================================================================= Preferably, use the `Generate Support String` button on the admin page's Diagnostics tab. That will auto-generate most of the info requested in this section. ========================================================================================= --> <!-- The version number, obtained from the logs (at startup) or the admin diagnostics page --> <!-- This is NOT the version number shown on the web vault, which is versioned separately from vaultwarden --> <!-- Remember to check if your issue exists on the latest version first! --> * vaultwarden version: `1.29.0` <!-- How the server was installed: Docker image, OS package, built from source, etc. --> * Install method: Docker image * MariaDB version: `10.6.12` * Other relevant details: ### Troubleshooting data I previously updated an instance successfully which has no organisations (MariaDB-Version `10.3.38`). This instance has two organisations. Let me know if you need more information.
Author
Owner
@BlackDex commented on GitHub (Jul 9, 2023): See https://github.com/dani-garcia/vaultwarden/wiki/Using-the-MariaDB-%28MySQL%29-Backend#foreign-key-errors-collation-and-charset
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/vaultwarden#1635