nextcloud / nextcloud/integration_davc
App enable fails "oc_davc_entities_calendars" is too long.
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 12
- Forks
- 2
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 16
Description
How to use GitHub
- Please use the 👍 reaction to show that you are affected by the same issue.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
Bug description
Enabling the integration_davc app fails during the database migration step with:
InvalidArgumentException: Primary index name on "oc_davc_entities_calendars" is too long.
The app cannot be enabled at all as a result.
Steps to reproduce
- Install/update to Nextcloud 32.0.x
- Go to Apps and enable
integration_davc(or runocc app:enable integration_davc) - The migration fails with the above error
Expected behavior
The app enables successfully and creates its database tables.
Actual behavior
Migration fails with InvalidArgumentException: Primary index name on "oc_davc_entities_calendars" is too long.
Root cause
Nextcloud's MigrationService::ensureOracleIdentifierLengthLimit() enforces a 30-character limit on all generated identifiers. The primary key and the cumulative prefix are therefore greater than this value.
A fix would be to explicitly name the primary key with a short identifier in the relevant Version...php migration file, e.g.:
$table->setPrimaryKey(['id'], 'davc_ent_cal_pk');
Environment
- Nextcloud version: 32.0.x
- Database: MariaDB
- Table prefix:
oc_
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Find the relevant Version...php migration file for the integration_davc app and inspect the table definition for oc_davc_entities_calendars. Start by reproducing the failure with occ app:enable integration_davc, then verify that the migration succeeds and the app enables successfully after the primary key receives a short explicit name.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mariadb, php
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100