"Query failed at: insert into mig_contentid" error during space migration
Platform Notice: Cloud and Data Center - This article applies equally to both cloud and data center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Learn how to resolve the error message "Query failed at: insert into mig_contentid_" when migrating spaces with the Confluence Cloud Migration Assistant (CCMA).
Overview
During a space migration with the CCMA, the space migration can fail with the below error message in the user interface:
1
2
Failed to export [cloudId=<cloud_id>,spaceKey=<spacekey>].
Error: Query failed at: insert into mig_contentid_tv2de693f75
The below signature is also found in the application log file atlassian-confluence.log:
1
2
3
4
5
6
7
ERROR [pool-0-thread-0] [agent.newexport.store.JdbcConfluenceStore] mutate Query failed at: insert into mig_contentid_tv2de693f75
...
Column 'id' cannot be null; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Column 'id' cannot be null
at org.springframework.jdbc.support.SQLExceptionSubclassTranslator.doTranslate(SQLExceptionSubclassTranslator.java:87)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:70)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:79)
...
The error indicates that a null value was passed to a field that cannot be null.
This mainly happens with the spacedescid column.
Solution
Run the below query in Confluence On-Premise to check if the column value is indeed null. Replace the "<spacekey>" in the last line with its actual value.
1 2 3
SELECT spacedescid FROM spaces WHERE spacekey = '<spacekey>';
After confirming the result is null, edit the space description in the UI to something else (How to edit space details).
Retry the space migration.
Was this helpful?