Skip to content

[Bug]: Database Issue Update from 34 to 35 #64748

Description

@biasutti

⚠️ This issue respects the following points: ⚠️

  • This is not a troubleshooting question, general support matter, or webserver/proxy problem, but likely a bug (if unsure, ask the Community Help Forum).
  • This issue is not already reported on Github OR solved at the Community Help Forum (I've searched!).
  • I'm using a maintained major version of Nextcloud Server and tested against the latest patch level. (Supported major versions and current patch levels).
  • I agree to follow Nextcloud's Code of Conduct.
  • I've tried my best to provide clear reproduction steps that someone unfamiliar with this bug could use to reproduce it.

Bug description

I run my nextcloud in a container environment with mysql as database. Since i updated from version 34 to 35 i cant get my instance up and running again.

Log on startup:

Upgrading nextcloud from 34.0.4.1 ...
Setting permissions
Setting log level to debug
Updating database schema
Updated database
OCP\DB\Schema\SchemaException: The table with name "nextcloud_prod.oc_sharing_share" already exists.
Update failed
Maintenance mode is kept active
Resetting log level
The database schema does not match what is expected for the installed version:
  - missing table 'oc_federated_invites'
  - missing table 'oc_sharing_classmap'
  - unexpected table 'oc_ex_event_handlers'
  - unexpected table 'oc_ex_speech_to_text'
  - unexpected table 'oc_ex_speech_to_text_q'
  - unexpected table 'oc_ex_text_processing'
  - unexpected table 'oc_ex_text_processing_q'
  - unexpected table 'oc_ex_translation'
  - unexpected table 'oc_ex_translation_q'
  - unexpected table 'oc_file_metadata'
  - unexpected table 'oc_ocm_token_map'
  - unexpected table 'oc_richdocuments_assets'
  - unexpected table 'oc_richdocuments_direct'
  - unexpected table 'oc_richdocuments_template'
  - unexpected table 'oc_richdocuments_wopi'
  - oc_activity: missing index 'activity_object'
  - oc_share_external: column 'id' differs in: autoincrement
Run "occ db:schema:check -v" for details.
Initializing finished

I deleted the nextcloud_prod.oc_sharing_share table by hand. Then it complains about the next table from nextcloud_prod.oc_sharing...xyz
Continued to deleted all of them results in the following log:
Doctrine\DBAL\Exception\ConnectionException: An exception occurred while executing a query: SQLSTATE[42000]: Syntax error or access violation: 1142 REFERENCES command denied to user 'REDACTED' for table 'nextcloud_prod.oc_sharing_share' Update failed

Tried without success:

  • downgrade to 34 again
  • occ maintenance:repair
  • occ db:schema:check -v

No changes to the database-user permission were made.
Any suggestions what i can try? Or what information do you need for some analysis?

Steps to reproduce

  1. Start Container in Version 35

Expected behavior

Startup without errors

Nextcloud Server version

35

Operating system

Other

PHP engine version

PHP 8.5

Web server

Apache (supported)

Database engine version

MySQL

Is this bug present after an update or on a fresh install?

Upgraded to a MAJOR version (ex. 31 to 32)

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

List of activated Apps

Nextcloud Signing status

Nextcloud Logs

Additional info

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    0. Needs triagePending check for reproducibility or if it fits our roadmap35-feedbackbug

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions