Skip to content

fix(appconfig,userconfig): restore pre-migration fallback for ownCloud migration#59677

Draft
miaulalala wants to merge 3 commits intomasterfrom
fix/57340/owncloud-migration-appconfig-userconfig
Draft

fix(appconfig,userconfig): restore pre-migration fallback for ownCloud migration#59677
miaulalala wants to merge 3 commits intomasterfrom
fix/57340/owncloud-migration-appconfig-userconfig

Conversation

@miaulalala
Copy link
Copy Markdown
Contributor

ownCloud-to-Nextcloud migration broke in NC31+ because AppConfig and UserConfig unconditionally query columns (type, lazy, flags, indexed) that don't exist in ownCloud's database schema. These columns are only created by later migration steps that never get a chance to run.

Restore the try/catch fallback in AppConfig::loadConfig() that was removed in a572a5c, and add the same pattern to UserConfig. When the database is missing the expected columns (REASON_INVALID_FIELD_NAME), fall back to querying only the columns that exist in ownCloud's schema.

Fixes: #57340

AI-Assisted-By: Claude Opus 4.6 noreply@anthropic.com

  • Resolves: #

Summary

TODO

  • ...

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

…d migration

ownCloud-to-Nextcloud migration broke in NC31+ because AppConfig and
UserConfig unconditionally query columns (type, lazy, flags, indexed)
that don't exist in ownCloud's database schema. These columns are only
created by later migration steps that never get a chance to run.

Restore the try/catch fallback in AppConfig::loadConfig() that was
removed in a572a5c, and add the same pattern to UserConfig. When
the database is missing the expected columns (REASON_INVALID_FIELD_NAME),
fall back to querying only the columns that exist in ownCloud's schema.

Fixes: #57340
Signed-off-by: Anna Larch <anna@larch.dev>
AI-Assisted-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Anna Larch <anna@nextcloud.com>
Unit tests verifying that AppConfig and UserConfig gracefully handle
missing database columns (type, lazy, flags, indexed) during ownCloud
migration. Tests cover the loadConfig fallback path, re-throwing of
unrelated exceptions, and column omission in insert queries.

Signed-off-by: Anna Larch <anna@larch.dev>
AI-Assisted-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Anna Larch <anna@nextcloud.com>
Signed-off-by: Anna Larch <anna@larch.dev>
AI-Assisted-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Anna Larch <anna@nextcloud.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.

[Bug]: Migration from ownCloud not possible since NC31

1 participant