Skip to content

fix(db): filter conversion tables by configured prefix - #56174

Open
joshtrichards wants to merge 1 commit into
masterfrom
jtr/db-convert-copytable-filter
Open

joshtrichards wants to merge 1 commit into
masterfrom
jtr/db-convert-copytable-filter

Conversation

@joshtrichards

@joshtrichards joshtrichards commented Nov 3, 2025 •

Copy link
Copy Markdown
Member
  • Resolves: # (hard to say)

Summary

During conversion, the table filter could include tables that don’t start with the configured prefix. This could cause unrelated tables to be included in the conversion or removed when using --clear-schema.

preg_match() returns 1 for a match, 0 for no match, and false on error. The previous !== false check accepted 0 as well as 1. Checking for === 1 ensures only actual Nextcloud tables are included.

P.S. Exact same matter in gSqlTools::resynchronizeDatabaseSequences(), which runs later if the target is PostgreSQL, is dealt with in PR #56173.

TODO

  • Backport

Follow-up matters

  • ConvertType currently lacks test coverage; should be dealt with in a follow-up PR

Checklist

@joshtrichards joshtrichards added this to the Nextcloud 33 milestone Nov 3, 2025
@joshtrichards
joshtrichards requested a review from a team as a code owner November 3, 2025 23:28
@joshtrichards joshtrichards added bug 3. to review Waiting for reviews feature: database Database related DB labels Nov 3, 2025
@joshtrichards
joshtrichards requested review from ArtificialOwl, icewind1991, leftybournes and yemkareems and removed request for a team November 3, 2025 23:28
This was referenced Jan 7, 2026
This was referenced Jan 14, 2026
This was referenced Jan 29, 2026
This was referenced Feb 11, 2026
@blizzz blizzz modified the milestones: Nextcloud 33, Nextcloud 34 Feb 16, 2026
This was referenced Jun 5, 2026
@susnux susnux added the community pull requests from community label Jun 9, 2026
@susnux susnux removed this from the Nextcloud 34.0.1 milestone Jun 9, 2026
Signed-off-by: Josh <josh.t.richards@gmail.com>
@joshtrichards
joshtrichards force-pushed the jtr/db-convert-copytable-filter branch from 9ff5072 to 8351fe5 Compare October 17, 2026 14:59
@joshtrichards joshtrichards added this to the Nextcloud 36 milestone Oct 17, 2026
@joshtrichards joshtrichards changed the title fix(db): make sure getTables filter only accepts matches fix(db): filter conversion tables by configured prefix Oct 17, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug community pull requests from community feature: database Database related DB

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants