nextcloud/lib/private/Config
Anna Larch b2c9273e5f fix(appconfig,userconfig): restore pre-migration fallback for ownCloud 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: https://github.com/nextcloud/server/issues/57340

Signed-off-by: Anna Larch <anna@nextcloud.com>
AI-Assisted-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-28 09:46:49 +02:00
..
ConfigManager.php fix(lexicon): switch bool value to non-lazy 2025-10-21 09:27:40 -01:00
PresetManager.php fix: Remove duplicated match values in PresetManager 2026-05-07 12:42:08 +02:00
UserConfig.php fix(appconfig,userconfig): restore pre-migration fallback for ownCloud migration 2026-05-28 09:46:49 +02:00