Skip to content

[stable35] fix(SchemaChecker): silence reports from db:add-missing-indices - #65017

Merged
CarlSchwan merged 6 commits into
stable35from
backport/64696/stable35
Oct 2, 2026
Merged

CarlSchwan merged 6 commits into
stable35from
backport/64696/stable35

Conversation

@backportbot

@backportbot backportbot Bot commented Oct 2, 2026

Copy link
Copy Markdown

Backport of PR #64696

- MySQL and MariaDB silently drop a literal DEFAULT clause on TEXT/BLOB columns. Migrations that declare such a default are a false-positive findings.
- example:
  - oc_flow_checks: column 'class' differs in: default

Assisted-by: ClaudeCode:claude-sonnet-5
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
- Migrator::getDiff() rewrites any STRING column longer than 4000 characters to TEXT for consistency
- SchemaChecker replays the same migrations for expected schema, but without going through that rewrite, reporting false positive finding.
- example:
  - oc_bookmarks: column 'url' differs in: type

Assisted-by: ClaudeCode:claude-sonnet-5
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
- command is not mandatory to run, so its indices are never schema
  drift in either direction - filter these findings completely
- example:
  - oc_mail_trusted_senders: missing index 'mail_trusted_senders_type'
  - oc_mail_trusted_senders: unexpected index 'mail_trusted_senders_idx'

Assisted-by: ClaudeCode:claude-sonnet-5
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
- A migration whose constructor depends on another app class (e.g. a
mapper) can't be resolved for a disabled app, since it isn't
autoloaded.
- The resulting exception used to also skip attributing any
tables already created before the failure, so they'd be reported as
blocking drift owned by no app instead of non-blocking findings under
the disabled app.
- verbose output might show false-positives because of that

Assisted-by: ClaudeCode:claude-sonnet-5
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
Assisted-by: ClaudeCode:claude-sonnet-5
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
- `occ db:schema:check` prints "The live database schema matches the expected schema." on a clean check
- Command was checking `$findings === []` instead of `$blocking === []`
- Now if the only findings are non-blocking (e.g. disabled-app drift), non-verbose output should show a success message

Assisted-by: ClaudeCode:claude-sonnet-5
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
@backportbot
backportbot Bot requested a review from a team as a code owner October 2, 2026 14:21
@backportbot
backportbot Bot requested review from Antreesy, CarlSchwan, SystemKeeper, come-nc, leftybournes, nickvergessen and salmart-dev and removed request for a team October 2, 2026 14:21
@backportbot backportbot Bot added bug 3. to review Waiting for reviews AI assisted labels Oct 2, 2026
@backportbot backportbot Bot added this to the Nextcloud 35.0.2 milestone Oct 2, 2026
@CarlSchwan
CarlSchwan merged commit c08825f into stable35 Oct 2, 2026
184 of 187 checks passed
@CarlSchwan
CarlSchwan deleted the backport/64696/stable35 branch October 2, 2026 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants