Million Link

When Vaultwarden upgrades, it doesn’t always succeed due to Foreign Keys being of different types.

There was a fault that I fixed by hand years ago, and the error still propagates through.

# docker logs website-vaultwarden

[2023-07-14 07:06:10.875][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, "Table 'organization_api_key' already exists"))': 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
  • Login to the Docker Server
  • Check the vaultwarden migrations
    • https://github.com/dani-garcia/vaultwarden/tree/main/migrations/mysql
  • Check the __diesel_schema_migrations to which migrations still need to be added.
    • make sure to manually add the new migrations to the diesel table.
  • Restart the docker container
    • docker restart website-vaultwarden
# docker restart website-vaultwarden

/--------------------------------------------------------------------\
|                        Starting Vaultwarden                        |
|                           Version 1.29.0                           |
|--------------------------------------------------------------------|
| This is an *unofficial* Bitwarden implementation, DO NOT use the   |
| official channels to report bugs/features, regardless of client.   |
| Send usage/configuration questions or feature requests to:         |
|   https://github.com/dani-garcia/vaultwarden/discussions or        |
|   https://vaultwarden.discourse.group/                             |
| Report suspected bugs/issues in the software itself at:            |
|   https://github.com/dani-garcia/vaultwarden/issues/new            |
\--------------------------------------------------------------------/

[INFO] Using saved config from `data/config.json` for configuration.

[WARNING] The following environment variables are being overriden by the config.json file.
[WARNING] Please use the admin panel to make changes to them:
[WARNING] ADMIN_TOKEN

[DEPRECATED]: `SMTP_SSL` or `SMTP_EXPLICIT_TLS` is set. Please use `SMTP_SECURITY` instead.
[NOTICE] You are using a plain text `ADMIN_TOKEN` which is insecure.
Please generate a secure Argon2 PHC string by using `vaultwarden hash` or `argon2`.
See: https://github.com/dani-garcia/vaultwarden/wiki/Enabling-admin-page#secure-the-admin_token

[2023-07-14 07:17:03.001][vaultwarden::api::notifications][INFO] Starting WebSockets server on 0.0.0.0:3012
[2023-07-14 07:17:03.004][start][INFO] Rocket has launched from http://0.0.0.0:80
[2023-07-14 07:17:03.721][vaultwarden::api::notifications][INFO] Accepting WS connection from 172.21.0.2:57106
[2023-07-14 07:17:03.945][request][INFO] GET /api/accounts/revision-date
[2023-07-14 07:17:03.948][response][INFO] (revision_date) GET /api/accounts/revision-date => 200 OK
Page 1

Million Link is an International Trading Group based out of Hong Kong with branches in Tianjin (China), India, Pakistan, Peru, USA and Egypt.
We specialize in Ferroalloys and have been supplying raw materials to the Steel Industry since 1997.
We are ISO 9001:2015 Quality Management System certified and we are an A-Licensed exporter of FerroAlloys.
Updated : 2025-06-07