Confluence upgrade on SQL Server fails due to 'execute could not complete schema update' error
問題
Confluence upgrade fails and the an error message similar to the following appears in atlassian-confluence.log
ERROR [main] [hibernate.tool.hbm2ddl.SchemaUpdate] execute Unsuccessful: alter table SPACEPERMISSIONS add constraint FK_SPACEPERMISSIONS_CREATOR foreign key (CREATOR) references user_mapping
ERROR [main] [hibernate.tool.hbm2ddl.SchemaUpdate] execute Column 'user_mapping.user_key' is not the same data type as referencing column 'SPACEPERMISSIONS.CREATOR' in foreign key 'FK_SPACEPERMISSIONS_CREATOR'.
ERROR [main] [hibernate.tool.hbm2ddl.SchemaUpdate] execute could not complete schema update
java.sql.SQLException: Column 'user_mapping.user_key' is not the same data type as referencing column 'SPACEPERMISSIONS.CREATOR' in foreign key 'FK_SPACEPERMISSIONS_CREATOR'.
at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:368)
at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2816)
診断
環境
- Microsoft SQL Server
原因
To provide support for Unicode characters in Microsoft SQL Server, Confluence uses and expects nchar, nvarchar, and ntext column data types for certain tables. This error is caused when Confluence expects the column data type to be nchar, nvarchar, or ntext but sees a different data type.
ソリューション
Automated method using XML Backup/Restore functionality
Manual method using SQL Server database tools
最終更新日 2018 年 11 月 2 日
Powered by Confluence and Scroll Viewport.