[stable35] fix(SchemaChecker): silence reports from db:add-missing-indices - #65017
Merged
Merged
Conversation
- 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
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
Antreesy
approved these changes
Oct 2, 2026
SystemKeeper
approved these changes
Oct 2, 2026
CarlSchwan
approved these changes
Oct 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of PR #64696