cannot upgrade bitbucket up to 5.X

Pavel Ryakin
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 5, 2024

During migration from 4.X version to 5.0.2 we got sql error. Seems that tables in postgresql were renamed and it results in such errors - "insert or update on table "bb_pr_comment_activity" violates foreign key constraint "fk_bb_pr_com_act_comment"

 

How can we fix it

Full log Errors...

 

Caused by: liquibase.exception.DatabaseException: ERROR: insert or update on table "bb_pr_comment_activity" violates foreign key constraint "fk_bb_pr_com_act_comment" Detail: Key (comment_id)=(1) is not present in table "bb_comment". [Failed SQL: (0) insert into bb_pr_comment_activity ( activity_id, comment_id, comment_action ) select activity_id, comment_id, comment_action from sta_pr_comment_activity] at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:397) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:83) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:151) at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1279) at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1261) at liquibase.changelog.ChangeSet.execute(ChangeSet.java:661) ... 41 common frames omitted Caused by: org.postgresql.util.PSQLException: ERROR: insert or update on table "bb_pr_comment_activity" violates foreign key constraint "fk_bb_pr_com_act_comment" Detail: Key (comment_id)=(1) is not present in table "bb_comment". at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2713) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2401) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:368) at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:498) at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:415) at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:335) at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:321) at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:297) at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:292) at com.zaxxer.hikari.pool.ProxyStatement.execute(ProxyStatement.java:94) at com.zaxxer.hikari.pool.HikariProxyStatement.execute(HikariProxyStatement.java) at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:393) ... 46 common frames omitted

 

1 answer

0 votes
Pavel Ryakin
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 5, 2024

resolved, there was data inconsistancy issue

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events