-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Low
-
None
-
Affects Version/s: 9.2.6, 10.0.1
-
Component/s: Server - Installer / Setup
-
None
-
Severity 3 - Minor
Issue Summary
Null constrains on LOWERSPACEKEY column in Spaces table is not created in SQL Server.
The problem could be observed both during Confluence installation or Site restore on instances which uses SQL Server database.
Steps to Reproduce
- Install confluence on SQL Server
- Connect to the database and check that LOWERSPACEKEY column has Not Null constraint
Expected Results
Constraint is present
Actual Results
Constraint is absent and the below warning is present in logs:
21:49:57,169 WARN [http-nio-8080-exec-10] [hibernate.schema.ConfluenceSchemaCreator] executeAdditionalSql Error executing SQL during schema changes: alter table SPACES alter column LOWERSPACEKEY varchar(255) not null, StatementCallback; uncategorized SQLException for SQL [alter table SPACES alter column LOWERSPACEKEY varchar(255) not null]; SQL state [S0001]; error code [5074]; The index 's_lspacekey_idx' is dependent on column 'LOWERSPACEKEY'.
Workaround
Drop index s_lspacekey_idx, create constraint and re-create index in database directly.
drop index if exists s_lspacekey_idx ON SPACES; alter table SPACES alter column LOWERSPACEKEY varchar(255) not null; create index s_lspacekey_idx on SPACES (lowerspacekey);