Windows upgrade from v2.3.2363 to v2.4.2373 reruns M0066_AddUsers and fails on duplicate username
Steps to reproduce
- Start with an existing Suwayomi Server v2.3.2363 installation and H2 database.
- Upgrade to v2.4.2373 using the Windows x64 MSI.
- Start Suwayomi Server.
- The first startup runs database migration 66 (AddUsers).
- Start the server again after the first migration/startup does not complete normally.
- The database still reports migration version 65, so migration 66 runs again.
- The repeated migration attempts to insert a username that already exists in USERACCOUNT and fails with a unique-index violation.
- The server exits with reason 5 (DbMigrationFailure).
Relevant sanitized error:
org.h2.jdbc.JdbcSQLIntegrityConstraintViolationException: Unique index or primary key violation: PUBLIC.USERACCOUNT_USERNAME_UNIQUE ON PUBLIC.USERACCOUNT(USERNAME NULLS FIRST) VALUES ('[REDACTED_USERNAME]')
Additional information:
- Previous working server: v2.3.2363
- New server: v2.4.2373
- Windows x64 MSI
- H2 database version reported by Suwayomi: 2.4.0
- A clean temporary data directory starts correctly with v2.4.2373.
- The problem occurs only with the existing upgraded database.
- No manual SQL changes have been made.
- Multiple filesystem backups were created before further troubleshooting.
Expected behavior
Migration 66 (AddUsers) should complete atomically and be recorded as completed.
If startup is interrupted or the migration is only partially completed, the next startup should safely resume or detect the existing migrated records instead of attempting to create the same USERACCOUNT username again.
After a successful upgrade, Suwayomi Server should start normally while preserving the existing library, extensions, categories, downloads, settings, and reading progress.
Actual behavior
The first v2.4.2373 startup partially runs migration 66. On subsequent startups, the database version is still reported as 65, so migration 66 runs again.
The second attempt encounters a USERACCOUNT username created during the earlier attempt and fails with a unique-index violation. Suwayomi Server then exits with DbMigrationFailure, and the launcher closes without opening the existing library.
Suwayomi-Server version
v2.4.2373
Used database
H2
Server operating system
Windows 11 Home [2009] build [26200]
Server Desktop Environment
Windows desktop
Server JVM version
OpenJDK 25.0.4 LTS, Zulu25.36+15-CA
Used client name
Suwayomi-WebUI through the bundled Electron client
Client version
r3518
Used web browser
Bundled Electron client
Client operating system
Windows 11 Home [2009] build [26200]
Other details
The v2.4.2373 installation launches successfully with a new empty Tachidesk data directory. This confirms that the Windows MSI installation, launcher, bundled JVM, Electron client, and server files can start successfully.
The failure occurs only when starting v2.4.2373 with the existing data upgraded from v2.3.2363.
The first v2.4.2373 startup began M0066_AddUsers. A later startup still reported database migration version 65 and ran M0066_AddUsers again. The repeated migration then failed because a USERACCOUNT username created during the previous attempt already existed.
The username has been replaced with [REDACTED_USERNAME] in this public report for privacy. The specific username value does not appear necessary to reproduce or diagnose the duplicate-username constraint failure.
The original data directory and two filesystem backups are preserved. No manual SQL UPDATE, INSERT, DELETE, DROP, or migration-history modification has been performed.
Please advise the supported recovery procedure for the partially completed M0066_AddUsers migration. I particularly need to know whether the existing USERACCOUNT record should be preserved, whether the migration can safely be resumed, or whether a corrected server build is required.
I cannot upload the H2 database publicly because it contains personal library and reading data. I can provide additional sanitized log excerpts if required.
Acknowledgements
- I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open or closed issue.
- I have checked the ongoing preview changelog of Suwayomi-WebUI and Suwayomi-Server and this bug has NOT been listed as fixed
- I have written a short but informative title (ideally less than ~100 characters).
- I have tried the troubleshooting guide described in README.md
- I have updated the (Suwayomi-WebUI and Suwayomi-Server) to the latest versions
- I have filled out all of the requested information in this form, including specific version numbers.
- I understand that Suwayomi does not have or fix any extensions, and I will not receive help for any issues related to sources or extensions.
Source: Suwayomi/Suwayomi-Server