nextcloud/tests/lib/Config
Anna Larch 705590e7d5 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-06-03 08:55:11 +02:00
..
LexiconTest.php chore: Remove broken PresetManager tests 2026-02-02 14:12:53 +00:00
TestConfigLexicon_I.php feat(lexicon): moving out from unstable 2025-07-24 15:56:33 -01:00
TestLexicon_E.php feat(lexicon): moving out from unstable 2025-07-24 15:56:33 -01:00
TestLexicon_N.php feat(lexicon): moving out from unstable 2025-07-24 15:56:33 -01:00
TestLexicon_UserIndexed.php fix(userconfig): using api bit functions 2025-09-17 10:17:53 -01:00
TestLexicon_UserIndexedRemove.php fix(userconfig): using api bit functions 2025-09-17 10:17:53 -01:00
TestLexicon_W.php feat(lexicon): moving out from unstable 2025-07-24 15:56:33 -01:00
UserConfigMigrationFallbackTest.php fix(appconfig,userconfig): restore pre-migration fallback for ownCloud migration 2026-06-03 08:55:11 +02:00
UserConfigTest.php chore: Run rector with new rules for fetch 2025-11-18 17:45:57 +01:00