Fix upgrade script executing against master instead of PerformanceMonitor#829
Merged
erikdarlingdata merged 2 commits intodevfrom Apr 11, 2026
Merged
Conversation
…itor (#828) 01_widen_version_columns.sql (PR #722) was missing USE PerformanceMonitor and SET options that every other upgrade script has. The installer connects to master, so the script's OBJECT_ID check resolved against master, found nothing, skipped both ALTERs, and reported success while leaving columns at nvarchar(255). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds _template.sql with the required SET options and USE PerformanceMonitor preamble so future upgrade scripts don't repeat the #828 mistake. Updates the README example to match the actual pattern used by all upgrade scripts. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
01_widen_version_columns.sql(added in PR Widen installation_history version columns to nvarchar(512) (#712) #722) was missingUSE PerformanceMonitor;and the standardSEToptions preambleInitialCatalog = "master", so the script'sOBJECT_ID(N'config.installation_history')resolved againstmaster, found nothing, skipped both ALTERs, and reported success — leaving columns atnvarchar(255)upgrades/has theUSEstatement; this one was the only exceptionHow it was found
User in #828 upgraded from v2.2.0 to v2.6.0. The install log showed
01_widen_version_columns.sql - Successbut theLogInstallationHistoryAsyncINSERT then failed with string truncation because the columns were never actually widened.Test plan
USE PerformanceMonitor;— this was the only one missing itFixes #828
🤖 Generated with Claude Code