What version are you upgrading from?
System information (Operating system, Java version, Database provider/version)
Red Hat Enterprise Linux 8 / OpenJDK 17 / MS SQL Server 2016
What’s the issue you’re facing?
The database schema migration from 8.9.10 to 9.9.0 fails with the following error:
org.sonar.server.platform.db.migration.step.MigrationStepExecutionException: Execution of migration step #6108 ‘Change size of column ‘kee’ in ‘components’’ failed
Caused by: java.lang.IllegalStateException: Fail to execute ALTER TABLE components ALTER COLUMN kee NVARCHAR (1000) NULL
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The index ‘projects_kee’ is dependent on column ‘kee’.
According to our database administrators, changing the ‘kee’ column to type NVARCHAR(1000) cannot work because:
- it is part of an index,
- NVARCHAR(1000) occupies (at least) 2,000 bytes,
- and index entries in SQL Server are limited to 1,700 bytes (see https://learn.microsoft.com/en-us/sql/sql-server/maximum-capacity-specifications-for-sql-server?view=sql-server-ver16)
Is this a known issue? Is there anything we can do?