Trying to migrate the old DB to new DB.
We are given .sql script of old SonarQube DB , which we are trying to restore to new DB.
Above mentioned versions are of new SonarQube and DB.We have no information on the old version of SonarQube. We are unable to restore the old data because of schema differences.
SonarQube Schema differences are,
1)analysis_properties table is present in old
2)In ce_activity table, execution_count is the extra column in the old schema
3)active_rule_parameters data is more in old schema.
Kindly suggest the way out to restore the old DB with old schema to new one as we have to see the analysis trend.
I am manually comparing the two schema and see above differences.
I guess a “.sql script” is a database backup? If so, simply restore it as-is. It’s SonarQube’s job to handle the database upgrades for you. What’s your starting version of SonarQube?
Hi,
Thank you for the reply. I have tried restoring DB and starting up SonarQube. However , it doesn’t come up.Unfortunately, I don’t know the earlier sonarQube version. Is there any way to get it from DB?
Thanks for your reply.
I am from the same team as Shubha. I have tried to restore the old DB and could see that highest value for VERSION in SCHEMA_MIGRATIONS table is 1838. There are around 493 rows in this table.
For the working DB, we could see that the highest version in schema_migrations table is 1423. Can you please let us know if there is any way to bring up SONAR using the old DB (with highest version as 1838).
Thanks a lot. I have upgraded sonar from 6.2 to 6.7. There are other issues related to code coverage data.I see that the recorded code coverage data is incorrect. Many test cases written using PowerMockito and TestNG are not considered for code coverage measure.could you help me resolve the same.