Skip to content

Re-run installation_history widen for pre-v2.7.0 no-op upgrades (#828)#936

Merged
erikdarlingdata merged 1 commit into
devfrom
fix/828-rewiden-version-columns
May 6, 2026
Merged

Re-run installation_history widen for pre-v2.7.0 no-op upgrades (#828)#936
erikdarlingdata merged 1 commit into
devfrom
fix/828-rewiden-version-columns

Conversation

@erikdarlingdata
Copy link
Copy Markdown
Owner

Summary

  • Adds upgrades/2.10.0-to-2.11.0/01_rewiden_version_columns.sql to re-run the installation_history version-column widening for servers stranded by the original [BUG] Installation History - Truncation Error #828 bug.
  • The 2.4.0-to-2.5.0 widen script was originally missing USE PerformanceMonitor; (fixed in [BUG] Installation History - Truncation Error #828, shipped v2.7.0). Servers that crossed 2.4 → 2.5 before v2.7.0 silently no-op'd the ALTERs against master, advanced past 2.5, and the upgrade filter (ToVersion > currentVersion) permanently skips the now-fixed script. Result: sql_server_version / sql_server_edition stay at nvarchar(255) and truncate SQL 2022+ @@VERSION strings (~260 chars).
  • Body is identical to the 2.4.0-to-2.5.0 widen and idempotent — IF EXISTS … max_length = 510 guards skip already-widened servers.
  • Confirmed by ghauan on [BUG] Installation History - Truncation Error #828 hitting this on a SQL 2025 server upgrading 2.8 → 2.10. Issue stays closed; commented there.

Test plan

  • Verify on a server still at nvarchar(255): run installer upgrade, confirm both columns become nvarchar(512) and the install record inserts without truncation warning.
  • Verify on an already-widened server: upgrade runs the script as a no-op (no ALTERs printed) and completes cleanly.
  • Confirm upgrade.txt is picked up by ScriptProvider.GetApplicableUpgrades for current → 2.11.0 paths.

🤖 Generated with Claude Code

Servers that crossed 2.4 -> 2.5 before PR #828's USE-statement fix shipped
in v2.7.0 ran the widen script as a no-op against master and advanced
their installer_version past 2.5. The upgrade filter (ToVersion > current)
then permanently skipped the now-fixed script, leaving sql_server_version
and sql_server_edition stuck at nvarchar(255) -- which truncates SQL 2022+
@@Version strings (~260 chars) on every install attempt.

Re-applies the same idempotent widen in 2.10.0-to-2.11.0 so any server
upgrading to the next release picks it up. The IF EXISTS guards on
max_length = 510 mean already-widened servers skip both ALTERs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@erikdarlingdata erikdarlingdata merged commit 0693983 into dev May 6, 2026
2 checks passed
@erikdarlingdata erikdarlingdata deleted the fix/828-rewiden-version-columns branch May 6, 2026 09:33
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