Database migration error in SonarQube 5.1.2 + PostgreSQL 13: No message available on columns("review

Question Title

Database migration error in SonarQube 5.1.2 + PostgreSQL 13: No message available on columns("reviews")


Problem Description

I’m trying to start SonarQube 5.1.2 with a PostgreSQL 13.20 database, but the database migration fails with the following error:

2025.07.26 12:56:33 INFO  web[DbMigration] -- columns("reviews")
2025.07.26 12:56:33 ERROR web[o.s.s.ui.JRubyFacade] Fail to upgrade database
An error has occurred, all later migrations canceled:

No message available
        arjdbc/jdbc/RubyJdbcConnection.java:121:in `columns'
        …
        /opt/sonarqube/web/WEB-INF/db/migrate/232_add_rule_columns_to_reviews.rb:27:in `up'
        …

When switching to the embedded H2 database, SonarQube starts correctly—this issue only occurs with PostgreSQL.

Environment

SonarQube Server: Community Edition 5.1.2 (zip)

activerecord-jdbc-adapter: 1.1.3

JRuby: jruby-complete-1.7.9 (bundled)

PostgreSQL: 13.20

Schema: default public on RHEL/CentOS

What I’ve Tried

Verified connection and permissions (SELECT on tables, USAGE on sequences).

Checked that the reviews table exists in the public schema.

Manually added the missing columns:
ALTER TABLE reviews
  ADD COLUMN rule_key VARCHAR(255),
  ADD COLUMN rule_name VARCHAR(255),
  ADD COLUMN severity VARCHAR(50);

Cleared JRuby cache:

rm -rf web/tmp

Goal

Complete the database schema initialization in PostgreSQL, including migration 232 that adds columns to the reviews table.

Hi,

Unfortunately, you won’t get any help here trying to run a 10-year-old version of SonarQube (5.1.2 was released in July 27, 2015 :birthday_cake:).

The SonarSource team only provides support for the latest version of the SonarQube Community Build, currently, version 25.7. Any issues with older versions, especially ones as old as 5.x, are considered out of scope, even if you manage to work around the migration errors manually.

I’m sorry, I just noticed that the wrong link was generated. I installed it and then I went away because it was late. Sorry for the confusion.