Skip to content

[stable34] fix(appconfig,userconfig): restore pre-migration fallback for ownCloud migration#60820

Open
backportbot[bot] wants to merge 1 commit into
stable34from
backport/59677/stable34
Open

[stable34] fix(appconfig,userconfig): restore pre-migration fallback for ownCloud migration#60820
backportbot[bot] wants to merge 1 commit into
stable34from
backport/59677/stable34

Conversation

@backportbot
Copy link
Copy Markdown

@backportbot backportbot Bot commented May 28, 2026

Backport of PR #59677

…d migration

AppConfig and UserConfig unconditionally queried NC-only columns (type,
lazy, flags, indexed) that don't exist in ownCloud's database schema,
breaking ownCloud → Nextcloud upgrades entirely before the schema
migration steps could run.

Restore the fallback pattern in both classes: on first loadConfig() call,
if a DBException with REASON_INVALID_FIELD_NAME is thrown, set
$migrationCompleted = false and retry selecting only the columns present
in ownCloud's schema. INSERT and UPDATE statements also omit NC-only
columns when $migrationCompleted is false.

The catch block also guards against infinite recursion: if $migrationCompleted
is already false when the exception fires, the exception is re-thrown
instead of triggering another recursive call.

Fixes: #57340

Signed-off-by: Anna Larch <anna@nextcloud.com>
AI-Assisted-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant