The Basics
- Nextcloud Server version (e.g., 29.x.x):
30.0.4
/30.0.2
- Operating system and version (e.g., Ubuntu 24.04):
Fedora 41
- Web server and version (e.g, Apache 2.4.25):
Apache 2.4.62
- Reverse proxy and version _(e.g. nginx 1.27.2)
nope
- PHP version (e.g, 8.3):
8.3.15
- Is this the first time you’ve seen this error? (Yes / No):
- No`
- When did this problem seem to first start?
Nextcloud 30.0.2
- Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
Update through the Updater in the Admin Panel
- Are you using CloudfIare, mod_security, or similar? (Yes / No)
No
Summary of the issue you are facing:
I am trying to upgrade from 30.0.1 to either 30.0.2 or 30.0.4.
I am doing this through the admin panel (Open Updater).
The first step (checks, backup, download, extract) works fine.
But the second step, the database upgrade / repair fails at a certain point.
Steps to replicate it (hint: details matter!):
- Open Updater
- Update to the latest version
Log entries
Preparing update
Set log level to debug
Turned on maintenance mode
Repair step: Repair MySQL collation
Repair info: Not a mysql database → nothing to do
Repair step: Copy data from accounts table when migrating from ownCloud
Repair step: Drop account terms table when migrating from ownCloud
Updating database schema
Updated database
Repair step: Upgrading Circles App
Updated “circles” to 30.0.0
Repair step: AppAPI Daemons configuration GPU params update
Repair info: Daemons configuration GPU params updated: 0
Updated “app_api” to 4.0.3
Repair step: Repair MySQL collation
Repair info: Not a mysql database → nothing to do
Repair step: Clean tags and favorites
Repair info: 0 tags of deleted users have been removed.
Repair info: 0 tags for delete files have been removed.
Repair info: 0 tag entries for deleted tags have been removed.
Repair info: 0 tags with no entries have been removed.
Repair step: Repair invalid shares
Repair step: Move .step file of updater to backup location
Repair info: .step file exists
Repair info: .step-previous-update removed
Repair info: .step file moved to .step-previous-update
Repair step: Add move avatar background job
Repair info: Repair step already executed
Repair step: Add preview cleanup background jobs
Repair step: Migrate oauth2_clients table to nextcloud schema
Repair info: Update the oauth2_access_tokens table schema.
Repair info: Update the oauth2_clients table schema.
Repair error: An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 19 NOT NULL constraint failed: oc_oauth2_access_tokens.hashed_code
Any idea how I can fix this constraint violation ???
Regards,
Oliver