You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Drop the reverted inbound registration schema during upgrade. - #399
During upgrade, drop the leftover inbound registration schema from the November 2026 detour: the lti_registration table, its foreign key from lti_key, and the five columns added to lti_key.
A missing table, column, foreign key, or index is left alone and not reported.
The block is marked at both ends so it can be deleted once every site has upgraded past it. It does not touch lti_tool_registration or lti_tool_deployment.
Test plan
On a database that still has the table and columns, run php admin/upgrade.php and confirm the DROP lines appear once.
Run upgrade again and confirm those objects are not mentioned.
On a database that never had them, confirm upgrade stays silent about them.
Improved database upgrade handling when remnants of an earlier LTI registration setup are present. Upgrades now clean up obsolete schema elements when available and continue if cleanup encounters an error.
Existing registration records are noted during cleanup before the obsolete data is removed.
CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.
Parsing warnings: 1
Validation error: Unrecognized key: "config_file" at "reviews.tools.phpstan"
If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
No actionable comments were generated in the recent review.
Walkthrough
The database upgrade removes leftover inbound registration schema objects. It checks for matching foreign keys, columns, indexes, and the lti_registration table. It logs positive row counts and reports schema-drop failures as non-fatal.
The upgrade drops matching foreign keys and existing legacy columns. It drops the named index only when it is not a foreign-key constraint. If lti_registration exists, the upgrade counts its rows, logs a notice when the count is positive, and drops the table. Cleanup SQL failures are logged and reported as non-fatal.
tsugiproject/tsugi#394: Adds the registration table, foreign key, and columns that this upgrade removes.
tsugiproject/tsugi#396: Adds the registration table and foreign key that this upgrade removes.
Merge Risk: Minimal · up to 177c8
This upgrade step removes leftover schema from the reverted inbound registration feature and skips anything already missing. No concrete merge-blocking risk was identified. Running an upgrade against a database that has the old schema, and one that never had it, would still be a sensible check.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title states the main change: the upgrade drops the reverted inbound lti_registration schema. The raw summary confirms the upgrade removes the lti_registration table, its foreign keys on lti_key, …
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title states the main change: the upgrade drops the reverted inbound lti_registration schema. The raw summary confirms the upgrade removes the lti_registration table, its foreign keys on lti_key, and five leftover columns. The title is specific, short, and matches the PR objectives.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Reviewing files that changed from the base of the PR and between 65fdd40 and 177c8b3.
Files selected for processing: 1
lib/src/Services/Lti/database.php
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.
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
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.
Summary
Test plan
Made with Cursor
Summary by CodeRabbit