nextcloud / nextcloud/integration_davc

App enable fails "oc_davc_entities_calendars" is too long.

Open Beginner friendly
#135 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
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
  1. Install/update to Nextcloud 32.0.x
  2. Go to Apps and enable integration_davc (or run occ app:enable integration_davc)
  3. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.