Error running migrations due to duplicate column name device_type #2057

Closed
opened 2026-02-05 02:59:45 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @oSumAtrIX on GitHub (Oct 7, 2024).

Vaultwarden Support String

Vaultwarden can not be started, so no support string can be retrieved.

Vaultwarden Build Version

v1.32.1

Deployment method

Official Container Image

Reverse Proxy

nginx

Host/Server Operating System

Linux

Operating System Version

Ubuntu 24

Clients

Web Vault, Browser Extension

Steps To Reproduce

This is tricky. I reverted to the v1.32.0 image, and the issue disappeared. I was able to access the web vault. Upgrading to the latest gave the same panic. It is unknown how to reproduce this.

Expected Result

The migration succeeds.

Actual Result

The migration fails due to a panic.

Logs

[2024-10-06 22:25:58.407][panic][ERROR] thread 'main' panicked at 'Error running migrations: QueryError(DieselMigrationName { name: "2024-09-04-091351_use_device_type_for_mails", version: MigrationVersion("20240904091351") }, DatabaseError(Unknown, "Duplicate column name 'device_type'"))': src/db/mod.rs:479
   0: vaultwarden::init_logging::{{closure}}
   1: std::panicking::rust_panic_with_hook
   2: std::panicking::begin_panic_handler::{{closure}}
   3: std::sys::backtrace::__rust_end_short_backtrace
   4: rust_begin_unwind
   5: core::panicking::panic_fmt
   6: core::result::unwrap_failed
   7: vaultwarden::db::DbPool::from_config
   8: vaultwarden::main::{{closure}}
   9: vaultwarden::main
  10: std::sys::backtrace::__rust_begin_short_backtrace
  11: main
  12: <unknown>
  13: __libc_start_main
  14: _start

Screenshots or Videos

image

Additional Context

No response

Originally created by @oSumAtrIX on GitHub (Oct 7, 2024). ### Vaultwarden Support String Vaultwarden can not be started, so no support string can be retrieved. ### Vaultwarden Build Version v1.32.1 ### Deployment method Official Container Image ### Reverse Proxy nginx ### Host/Server Operating System Linux ### Operating System Version Ubuntu 24 ### Clients Web Vault, Browser Extension ### Steps To Reproduce This is tricky. I reverted to the v1.32.0 image, and the issue disappeared. I was able to access the web vault. Upgrading to the latest gave the same panic. It is unknown how to reproduce this. ### Expected Result The migration succeeds. ### Actual Result The migration fails due to a panic. ### Logs ```text [2024-10-06 22:25:58.407][panic][ERROR] thread 'main' panicked at 'Error running migrations: QueryError(DieselMigrationName { name: "2024-09-04-091351_use_device_type_for_mails", version: MigrationVersion("20240904091351") }, DatabaseError(Unknown, "Duplicate column name 'device_type'"))': src/db/mod.rs:479 0: vaultwarden::init_logging::{{closure}} 1: std::panicking::rust_panic_with_hook 2: std::panicking::begin_panic_handler::{{closure}} 3: std::sys::backtrace::__rust_end_short_backtrace 4: rust_begin_unwind 5: core::panicking::panic_fmt 6: core::result::unwrap_failed 7: vaultwarden::db::DbPool::from_config 8: vaultwarden::main::{{closure}} 9: vaultwarden::main 10: std::sys::backtrace::__rust_begin_short_backtrace 11: main 12: <unknown> 13: __libc_start_main 14: _start ``` ### Screenshots or Videos ![image](https://github.com/user-attachments/assets/06cb9e16-0b7a-4db5-b4bb-8f2c8361dfff) ### Additional Context _No response_
OVERLORD added the bug label 2026-02-05 02:59:45 +03:00
Author
Owner

@BlackDex commented on GitHub (Oct 7, 2024):

Looks like something didn't door completed, or you used the testing tagged images also recently.

The only way to fix this correctly is by removing the extra column device_type from the twofactor_incomplete tabel, and let Vaultwarden run the migration again.

@BlackDex commented on GitHub (Oct 7, 2024): Looks like something didn't door completed, or you used the testing tagged images also recently. The only way to fix this correctly is by removing the extra column `device_type` from the `twofactor_incomplete` tabel, and let Vaultwarden run the migration again.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/vaultwarden#2057