Skip to content

Fix upgrade script executing against master instead of PerformanceMonitor#829

Merged
erikdarlingdata merged 2 commits intodevfrom
fix/upgrade-script-missing-use-828
Apr 11, 2026
Merged

Fix upgrade script executing against master instead of PerformanceMonitor#829
erikdarlingdata merged 2 commits intodevfrom
fix/upgrade-script-missing-use-828

Conversation

@erikdarlingdata
Copy link
Copy Markdown
Owner

Summary

  • 01_widen_version_columns.sql (added in PR Widen installation_history version columns to nvarchar(512) (#712) #722) was missing USE PerformanceMonitor; and the standard SET options preamble
  • The installer connects with InitialCatalog = "master", so the script's OBJECT_ID(N'config.installation_history') resolved against master, found nothing, skipped both ALTERs, and reported success — leaving columns at nvarchar(255)
  • Every other upgrade script in upgrades/ has the USE statement; this one was the only exception

How it was found

User in #828 upgraded from v2.2.0 to v2.6.0. The install log showed 01_widen_version_columns.sql - Success but the LogInstallationHistoryAsync INSERT then failed with string truncation because the columns were never actually widened.

Test plan

  • Verified all other upgrade scripts have USE PerformanceMonitor; — this was the only one missing it
  • Test upgrade from pre-2.5.0 to current on a test server

Fixes #828

🤖 Generated with Claude Code

erikdarlingdata and others added 2 commits April 10, 2026 21:54
…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>
@erikdarlingdata erikdarlingdata merged commit bffd7a7 into dev Apr 11, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant