Newcircuit 1c8db4401779333389b774086d6390f160bbb49078a0eda577b43dcf5018a77f

Ashley Whetter's Blog

[programming, linux] ++ [stuff]

Social inside twitter icon ee809e0d7c5b2294b7d548e7223909c678d76c5484045ae68ecb7c559cd7fade Social inside google icon dbbc88b746b52525f1e1bd5e2bf44152b2713fb976f7e68b903c2d13e9fbd160 Octocat 1fcbe3003defcb5ee415b3a7aa989bbc724ccf3c446436e848c27437901c6ca2 Social inside rss icon ff8ccbbb13f265afbe3cadba03c838cdbcad75b6f223a7937eab3ee35afc933d Social inside linkedin icon 5f3acefcb096b75afe32a0e0b3d90d1f2c1b374049eb8c1996203225e1ae34ba

Fixing the Sonar database after a failed upgrade

When upgrading Sonar from a version below 2.13, it will update the current Sonar database to the new format. If something goes wrong whilst Sonar is upgrading, Sonar won't clean up for you and you'll have to either restore a backup or cleanup yourself before upgrading again.

To cleanup manually, run the following commands on the database:

DROP TABLE reviews, review_comments, active_rule_changes, active_rule_param_changes, manual_measures, notifications, duplications_index;
DROP TABLE loaded_templates, resource_index, action_plans, action_plans_reviews, active_rule_notes, rule_notes;

Sonar might not have created all the tables if it didn't get far enough, but the commands should still execute as far as possible.

Categories: None