Repository navigation
fix(sqlite): add MCP metadata migration - #4060
Merged
lyingbug merged 1 commit intoOct 10, 2026
Merged
Conversation
10 tasks done
This was referenced Oct 10, 2026
Collaborator
|
Review of Please coordinate the SQLite migration version with #4053 and #3644 before merging these changes together. All three PRs add version Assign a unique version to whichever migration lands later and rerun the complete SQLite migration sequence after integration. This PR's standalone database tests pass; the failure is in the combined migration directory. |
This was referenced Oct 11, 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.
Summary
mcp_services.usage_instructionsmcp_metadatatable used by persisted MCP tool directoriesFixes #4058
Problem
Lite selects
migrations/sqlite, but that migration set stopped at version 33while the application already reads and writes
mcp_services.usage_instructionsand
mcp_metadata. PostgreSQL received the equivalent schema in migration000092_mcp_metadata, so the two deployment modes had drifted.On Lite, the missing schema causes errors such as:
These failures affect MCP service creation and editing, tool-directory refresh,
usage-instruction persistence, and the Agent's persisted MCP directory path.
Changes
000034_mcp_metadatamcp_services.usage_instructionswith the same non-null empty-string default as PostgreSQLmcp_metadatawith tenant/service/principal identity and SQLite-compatible JSON text storageTesting
go test ./internal/database -count=1go test ./internal/database -run 'TestSQLiteMigrations(CreateVersionedSchema|UpgradeV33PreservesMCPServices)$' -count=1 -vgo test ./internal/database -run '^TestSQLiteMigrationsUpgradeV33PreservesMCPServices$' -count=20go vet ./internal/databasegolangci-lint run --new-from-rev=origin/main ./...go test -tags desktop ./internal/containergo build ./cmd/serverThe same upgrade regression fails on the unpatched base with
no such column: usage_instructionsand passes with this migration. The patchwas also applied to the latest
origin/mainsnapshot and the targeted fresh andupgrade tests passed there.