Database migration error from 1.91.1 to 1.92.2 #1478

Closed
opened 2026-04-06 01:55:58 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @juliohm1978 on 9/1/2023

Subject of the issue

Data base migration error while updating from version 1.29.1 to 1.29.2.

Deployment environment

  • vaultwarden version: 1.29.2

  • Install method: Kubernetes deployment

  • MySQL: 8.0.34

  • Other relevant details: simple upgrade by switching container image tags.

Steps to reproduce

I have version 1.29.1 running without any issues in a Kubernetes cluster. Upon upgrade to version 1.29.2, the container crashes with the following error:

[2023-08-31 22:30:31.148][panic][ERROR] thread 'main' panicked at 'Error running migrations: QueryError(DieselMigrationName { name: "2023-06-17-200424_create_auth_requests_table", version: M
igrationVersion("20230617200424") }, DatabaseError(Unknown, "Referencing column 'user_uuid' and referenced column 'uuid' in foreign key constraint 'auth_requests_ibfk_1' are incompatible."))
': src/db/mod.rs:471                                                                                                                                                                          
   0: vaultwarden::init_logging::{{closure}}                                                                                                                                                  
   1: std::panicking::rust_panic_with_hook                                                                                                                                                    
   2: std::panicking::begin_panic_handler::{{closure}}                                                                                                                                        
   3: std::sys_common::backtrace::__rust_end_short_backtrace                                                                                                                                  
   4: rust_begin_unwind                                                                                                                                                                       
   5: core::panicking::panic_fmt                                                                                                                                                              
   6: core::result::unwrap_failed                                                                                                                                                             
   7: vaultwarden::db::mysql_migrations::run_migrations                                                                                                                                       
   8: vaultwarden::db::DbPool::from_config                                                                                                                                                    
   9: vaultwarden::main::{{closure}}                                                                                                                                                          
  10: tokio::runtime::park::CachedParkThread::block_on                                                                                                                                        
  11: tokio::runtime::context::runtime::enter_runtime                                                                                                                                         
  12: tokio::runtime::runtime::Runtime::block_on                                                                                                                                              
  13: vaultwarden::main                                                                                                                                                                       
  14: std::sys_common::backtrace::__rust_begin_short_backtrace                                                                                                                                
  15: std::rt::lang_start::{{closure}}                                                                                                                                                        
  16: std::rt::lang_start_internal                                                                                                                                                            
  17: main                                                                                                                                                                                    
  18: <unknown>                                                                                                                                                                               
  19: __libc_start_main                                                                                                                                                                       
  20: _start                                                                                                                                                                                  
*Originally created by @juliohm1978 on 9/1/2023* ### Subject of the issue Data base migration error while updating from version 1.29.1 to 1.29.2. ### Deployment environment * vaultwarden version: 1.29.2 * Install method: Kubernetes deployment * MySQL: 8.0.34 * Other relevant details: simple upgrade by switching container image tags. ### Steps to reproduce I have version 1.29.1 running without any issues in a Kubernetes cluster. Upon upgrade to version 1.29.2, the container crashes with the following error: ``` [2023-08-31 22:30:31.148][panic][ERROR] thread 'main' panicked at 'Error running migrations: QueryError(DieselMigrationName { name: "2023-06-17-200424_create_auth_requests_table", version: M igrationVersion("20230617200424") }, DatabaseError(Unknown, "Referencing column 'user_uuid' and referenced column 'uuid' in foreign key constraint 'auth_requests_ibfk_1' are incompatible.")) ': src/db/mod.rs:471 0: vaultwarden::init_logging::{{closure}} 1: std::panicking::rust_panic_with_hook 2: std::panicking::begin_panic_handler::{{closure}} 3: std::sys_common::backtrace::__rust_end_short_backtrace 4: rust_begin_unwind 5: core::panicking::panic_fmt 6: core::result::unwrap_failed 7: vaultwarden::db::mysql_migrations::run_migrations 8: vaultwarden::db::DbPool::from_config 9: vaultwarden::main::{{closure}} 10: tokio::runtime::park::CachedParkThread::block_on 11: tokio::runtime::context::runtime::enter_runtime 12: tokio::runtime::runtime::Runtime::block_on 13: vaultwarden::main 14: std::sys_common::backtrace::__rust_begin_short_backtrace 15: std::rt::lang_start::{{closure}} 16: std::rt::lang_start_internal 17: main 18: <unknown> 19: __libc_start_main 20: _start ```
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/vaultwarden#1478