@@ -26,25 +26,23 @@ module Helper
2626
2727 def self . reg_version_string ( version )
2828 case version . to_s # to_s to make sure someone didn't pass us an int
29- when '2012' then 'MSSQL11.'
3029 when '2016' then 'MSSQL13.'
3130 when '2017' then 'MSSQL14.'
3231 when '2019' then 'MSSQL15.'
3332 when '2022' then 'MSSQL16.'
3433 when '2025' then 'MSSQL17.'
35- else raise "Unsupported sql_server version '#{ version } '. Please open a PR to add support for this version. "
34+ else raise "Unsupported sql_server version '#{ version } '. Supported versions: 2016, 2017, 2019, 2022, 2025 "
3635 end
3736 end
3837
3938 def self . install_dir_version ( version )
4039 case version . to_s # to_s to make sure someone didn't pass us an int
41- when '2012' then '110'
4240 when '2016' then '130'
4341 when '2017' then '140'
4442 when '2019' then '150'
4543 when '2022' then '160'
4644 when '2025' then '170'
47- else raise "SQL Server version #{ version } not supported. Please open a PR to add support for this version. "
45+ else raise "SQL Server version #{ version } not supported. Supported versions: 2016, 2017, 2019, 2022, 2025 "
4846 end
4947 end
5048
@@ -54,53 +52,38 @@ def self.firewall_rule_enabled?(rule_name = nil)
5452 end
5553
5654 def self . sql_server_url ( version , x86_64 )
57- if x86_64
58- case version . to_s # to_s to make sure someone didn't pass us an int
59- when '2012' then 'https://download.microsoft.com/download/8/D/D/8DD7BDBA-CEF7-4D8E-8C16-D9F69527F909/ENU/x64/SQLEXPR_x64_ENU.exe'
60- when '2016' then 'https://download.microsoft.com/download/9/0/7/907AD35F-9F9C-43A5-9789-52470555DB90/ENU/SQLEXPR_x64_ENU.exe'
61- when '2017' then 'https://download.microsoft.com/download/E/F/2/EF23C21D-7860-4F05-88CE-39AA114B014B/SQLEXPR_x64_ENU.exe'
62- when '2019' then 'https://download.microsoft.com/download/7/c/1/7c14e92e-bdcb-4f89-b7cf-93543e7112d1/SQLEXPR_x64_ENU.exe'
63- when '2022' then 'https://download.microsoft.com/download/5/1/4/5145fe04-4d30-4b85-b0d1-39533663a2f1/SQL2022-SSEI-Expr.exe'
64- when '2025' then 'https://download.microsoft.com/download/7ab8f535-7eb8-4b16-82eb-eca0fa2d38f3/SQL2025-SSEI-Expr.exe'
65- end
66- else
67- case version . to_s
68- when '2012' then 'https://download.microsoft.com/download/8/D/D/8DD7BDBA-CEF7-4D8E-8C16-D9F69527F909/ENU/x86/SQLEXPR_x86_ENU.exe'
69- end
55+ return unless x86_64 # Only x86_64 is supported for modern SQL Server versions
56+
57+ case version . to_s # to_s to make sure someone didn't pass us an int
58+ when '2016' then 'https://download.microsoft.com/download/9/0/7/907AD35F-9F9C-43A5-9789-52470555DB90/ENU/SQLEXPR_x64_ENU.exe'
59+ when '2017' then 'https://download.microsoft.com/download/E/F/2/EF23C21D-7860-4F05-88CE-39AA114B014B/SQLEXPR_x64_ENU.exe'
60+ when '2019' then 'https://download.microsoft.com/download/7/c/1/7c14e92e-bdcb-4f89-b7cf-93543e7112d1/SQLEXPR_x64_ENU.exe'
61+ when '2022' then 'https://download.microsoft.com/download/5/1/4/5145fe04-4d30-4b85-b0d1-39533663a2f1/SQL2022-SSEI-Expr.exe'
62+ when '2025' then nil # URL not yet available - use source_url property
7063 end
7164 end
7265
7366 def self . sql_server_package_name ( version , x86_64 )
74- if x86_64
75- case version . to_s # to_s to make sure someone didn't pass us an int
76- when '2012' then 'Microsoft SQL Server 2012 (64-bit)'
77- when '2016' then 'Microsoft SQL Server 2016 (64-bit)'
78- when '2017' then 'Microsoft SQL Server 2017 (64-bit)'
79- when '2019' then 'Microsoft SQL Server 2019 (64-bit)'
80- when '2022' then 'Microsoft SQL Server 2022 (64-bit)'
81- when '2025' then 'Microsoft SQL Server 2025 (64-bit)'
82- end
83- else
84- case version . to_s
85- when '2012' then 'Microsoft SQL Server 2012 (32-bit)'
86- end
67+ return unless x86_64 # Only x86_64 is supported for modern SQL Server versions
68+
69+ case version . to_s # to_s to make sure someone didn't pass us an int
70+ when '2016' then 'Microsoft SQL Server 2016 (64-bit)'
71+ when '2017' then 'Microsoft SQL Server 2017 (64-bit)'
72+ when '2019' then 'Microsoft SQL Server 2019 (64-bit)'
73+ when '2022' then 'Microsoft SQL Server 2022 (64-bit)'
74+ when '2025' then 'Microsoft SQL Server 2025 (64-bit)'
8775 end
8876 end
8977
9078 def self . sql_server_checksum ( version , x86_64 )
91- if x86_64
92- case version . to_s # to_s to make sure someone didn't pass us an int
93- when '2012' then '7f5e3d40b85fba2da5093e3621435c209c4ac90d34219bab8878e93a787cf29f'
94- when '2016' then '2A5B64AE64A8285C024870EC4643617AC5146894DD59DD560E75CEA787BF9333'
95- when '2017' then 'F857FF82145E196BF85AF32EEB0193FE38302E57B30BEB54E513630C60D83E0D'
96- when '2019' then 'bea033e778048748eb1c87bf57597f7f5449b6a15bac55ddc08263c57f7a1ca8'
97- when '2022' then '36e0ec2ac3dd60f496c99ce44722c629209ea7302a2ce9cbfd1e42a73510d7b6'
98- when '2025' then '1c677a33b318481c3217128835f8405cf0026621dcd04b13eb6cb0982e823f27'
99- end
100- else
101- case version . to_s
102- when '2012' then '9bdd6a7be59c00b0201519b9075601b1c18ad32a3a166d788f3416b15206d6f5'
103- end
79+ return unless x86_64 # Only x86_64 is supported for modern SQL Server versions
80+
81+ case version . to_s # to_s to make sure someone didn't pass us an int
82+ when '2016' then '2A5B64AE64A8285C024870EC4643617AC5146894DD59DD560E75CEA787BF9333'
83+ when '2017' then 'F857FF82145E196BF85AF32EEB0193FE38302E57B30BEB54E513630C60D83E0D'
84+ when '2019' then 'bea033e778048748eb1c87bf57597f7f5449b6a15bac55ddc08263c57f7a1ca8'
85+ when '2022' then '36e0ec2ac3dd60f496c99ce44722c629209ea7302a2ce9cbfd1e42a73510d7b6'
86+ when '2025' then nil # Checksum not yet available - use package_checksum property
10487 end
10588 end
10689 end
0 commit comments